0

Any idea of how one record can use data from on field of another record (from the same table) and add data to it ?

One drawing can be more explicit. I am trying to do this :

Capture d’écran 2019-09-20 à 23.16.29

To be more specific, I am trying to make the "ancestors filed".

Two records have one child, so the child have two parents. But, since each parents have two parents, the child have four grand parents. And if we keep adding grand-grand-grand... parents, the child will have more and more ancestors.

So I need an "ancestor" field that can keep track of all the ancestors of the child. But I really don't know how. Maybe, it's easy.

Any idea ?

 

Regards

6 replies

null
    • Mconneen
    • 4 yrs ago
    • Reported - view

    Does this work for you? 

    familyTree

    person

    • Mconneen
    • 4 yrs ago
    • Reported - view

    And Mimi's Mom would look like. 

    mimisMom

    So.. you can keep walking up the tree .. ?? 

    • magnificent7
    • 4 yrs ago
    • Reported - view

    Thank you for this answer,

     

    If your method allwos me to have a field (an array ?) that list all the descendants inside each Records, it's perfect.

    I have to export a Json with all the descedants.

    • Mconneen
    • 4 yrs ago
    • Reported - view

    It should.. you just need to decide which way you are walking the tree.   Up from Mimi (ancestors) .. or down from John (descendants)

    • magnificent7
    • 4 yrs ago
    • Reported - view

    OK.

     

    Now I have to figure out how to make it (sorry, I am quite a newby in the wonderful database universe).

    • magnificent7
    • 4 yrs ago
    • Reported - view

    Is there a way to see your database insight ?

    Thank you very much angain

Content aside

  • 4 yrs agoLast active
  • 6Replies
  • 1870Views