parent_of(Parent,Child)
father_of(Father,Child)
mother_of(Mother,Child)
ancestor_of(Ancestor,Descendant)%% Should be recursive
sibling_of(Sib1,Sib2)
sister_of(Sister,Sibling)
brother_of(Brother,Sibling)
oldest_child (Parent,Oldest)
oldest_son (Parent,OldestSon)
oldest_daughter(Parent,OldestDaughter)
number_of_children(Parent,Num)%% Should use the 'is' predicate
number_of_sons(Parent,N).
number_of_daughters(Parent,N).
Your list of list approach is too complicated, and it does not handle more than 3 siblings.
I do not mention the patchwork families: http://www.magyarulbabelben.net/works/e ... oc_lang=en Karinthy told to his wife: "My child and your child is beating our child."
The chronicle of my great-grandfather: X married with Y. Both of them had brought 4 children in the marriage and they had 4 common children.
The database should be very simple. It need not contain more than persons and primary relations:
Tz, Have you ever heard of the 5 normal forms of the relational databases?
What is your mother language? Are the words for family relations the same as in English?
If not what are the differences? Why have I recommended to include the date of birth in the facts?Imagine the following situation:
Hermine sister believes that she is a daughter of a Catholic priest and a nun. When she gets infected with Ebola the hospital makes a DNA test on her and an unknown woman laying in the neighboring bed. The DNA test shows that they are full sisters.
Think How many record should you correct in the family database if it is in your list of list structure and in the simple one i proposed in my previous answer?
Tricky example of dates:
Natasha is a smuggler between Alaska (USA) and Tchukchland (RU). She is crossing the Date Line at least twice on her daily route if the weather is calm. In case of stormy weather her ship is tossing across it much more times.
She is on her cabin cruiser when the Date Line separates 2000 Dec 31 and 2001 Jan 1.
She cannot rule the ship because she labors - twins. The elder twin is born in 2001 Jan 1 on the water territory of Russia, the younger twin is born in 2000 Dec 31 on the water territory of USA.
The real time difference is 15 minutes. The calendar difference is a millenium.