# Self Relationship - Add Update Delete

**URL:** <https://discuss.elastic.co/t/self-relationship-add-update-delete/218950>\
**Category:** Elasticsearch\
**Created:** [February 12, 2020, 10:56am UTC](https://discuss.elastic.co/t/self-relationship-add-update-delete/218950 "2020-02-12T10:56:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aakash\_Sharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aakash_sharma/32/61042_2.png) [@Aakash\_Sharma](https://discuss.elastic.co/u/Aakash_Sharma)\
**Post date:** [February 12, 2020, 10:56am UTC](https://discuss.elastic.co/t/self-relationship-add-update-delete/218950/1 "2020-02-12T10:56:47Z")

</div>

Hi i have a document type "artefact" (fields like name, type, author,usage etc.) this artefact can be referenced by other artefacts and also contain references of other artefacts.

What is the best way to depict such relationships. Should we just store the ids of the linked document or in denormalized form. What is the recommended strategy for such requirements in Elastic. Should there be separate collection to store such relationship Iike hashmap etc.)

## For search queries that we receive from front-end application. We may need to pass extrainformation for the references such as (name,author etc.). Would we be required to execute multiple queries to handle this situation as well as delete operation. Please throw some light on this.

Just an after thought - should relations be stored separately in a table (relational or non-relational) for such use cases??

thanks,  
Aakash

---

<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:** [March 11, 2020, 10:58am UTC](https://discuss.elastic.co/t/self-relationship-add-update-delete/218950/2 "2020-03-11T10:58:38Z")

</div>

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