# Creating Mappings for Index Interconnections in ElasticSearch: How to Establish Relationships Between Tables?

**URL:** <https://discuss.elastic.co/t/creating-mappings-for-index-interconnections-in-elasticsearch-how-to-establish-relationships-between-tables/350749>\
**Category:** Kibana\
**Tags:** elastic-stack-sql\
**Created:** [January 10, 2024, 12:46pm UTC](https://discuss.elastic.co/t/creating-mappings-for-index-interconnections-in-elasticsearch-how-to-establish-relationships-between-tables/350749 "2024-01-10T12:46:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neelesh\_Gupta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/neelesh_gupta/32/130683_2.png) [@Neelesh\_Gupta](https://discuss.elastic.co/u/Neelesh_Gupta)\
**Post date:** [January 10, 2024, 12:46pm UTC](https://discuss.elastic.co/t/creating-mappings-for-index-interconnections-in-elasticsearch-how-to-establish-relationships-between-tables/350749/1 "2024-01-10T12:46:48Z")

</div>

I've successfully uploaded 10 CSV file as tables to Elasticsearch to create a Kibana dashboard. However, since these tables are interlinked with foreign keys, they have been transformed into JSON (NoSQL) format in elastic. I'm now looking for guidance on how to establish mappings for relationships, such as one-to-many and one-to-one, similar to what we do in relational databases. What are the recommended approaches to achieve this in Elasticsearch?  
my main goal is to make reports or dashboard with Kibana

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 10, 2024, 6:27pm UTC](https://discuss.elastic.co/t/creating-mappings-for-index-interconnections-in-elasticsearch-how-to-establish-relationships-between-tables/350749/2 "2024-01-10T18:27:25Z")

</div>

Elasticsearch is not a relational database.  
Have a look at [Join field type | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/parent-join.html)

> We don’t recommend using multiple levels of relations to replicate a relational model. Each level of relation adds an overhead at query time in terms of memory and computation. For better search performance, denormalize your data instead.

That's indeed the best option.

---

<div class="post-metadata">

**Author:** ![Priscilla\_Parodi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/priscilla_parodi/32/43047_2.png) [@Priscilla\_Parodi](https://discuss.elastic.co/u/Priscilla_Parodi)\
**Post date:** [January 11, 2024, 12:21am UTC](https://discuss.elastic.co/t/creating-mappings-for-index-interconnections-in-elasticsearch-how-to-establish-relationships-between-tables/350749/3 "2024-01-11T00:21:22Z")

</div>

Duplicated: [Creating Mappings for Index Interconnections in ElasticSearch: How to Establish Relationships Between Tables?](https://discuss.elastic.co/t/creating-mappings-for-index-interconnections-in-elasticsearch-how-to-establish-relationships-between-tables/350751)

---

<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:** [February 8, 2024, 12:21am UTC](https://discuss.elastic.co/t/creating-mappings-for-index-interconnections-in-elasticsearch-how-to-establish-relationships-between-tables/350749/4 "2024-02-08T00:21:43Z")

</div>

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