# Understanding Index and Type

**URL:** <https://discuss.elastic.co/t/understanding-index-and-type/185248>\
**Category:** Elasticsearch\
**Created:** [June 11, 2019, 5:20pm UTC](https://discuss.elastic.co/t/understanding-index-and-type/185248 "2019-06-11T17:20:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashokchinna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashokchinna/32/47123_2.png) [@ashokchinna](https://discuss.elastic.co/u/ashokchinna)\
**Post date:** [June 11, 2019, 5:20pm UTC](https://discuss.elastic.co/t/understanding-index-and-type/185248/1 "2019-06-11T17:20:07Z")

</div>

In general comparison of Elastic Search with Relational Database,

- Database (Relational Database) is Index (Elastic Search)
- Table (Relational Database) is Document Type (Elastic Search)

So, a database can have multiple tables.

However, Elastic Search 7.0 doesn't support having multiple types in the same index.

How I can design the database where I have a database (logical host) which have multiple tables?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 11, 2019, 5:45pm UTC](https://discuss.elastic.co/t/understanding-index-and-type/185248/2 "2019-06-11T17:45:58Z")

</div>

When you model data in Elasticsearch you need to think about it in terms of what you want to serach and get returned rather than how it might be structured in a relational database. As it is a document store and very different from a relational database this kind of analogies are typically not very useful.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 9, 2019, 5:46pm UTC](https://discuss.elastic.co/t/understanding-index-and-type/185248/3 "2019-07-09T17:46:04Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
