Question:

How can I draw E-R diagram for family tree

by  |  earlier

0 LIKES UnLike

Draw an entity-relationship diagram and list all attributes including the primary key for each entity type, for a database suitable for showing fatherhood, motherhood, brotherhood, sisterhood, cousins, nephews, nieces and nephews, grandparents, in short all family relationships. Remember that it is possible to reproduce without marriage and that marriage does not imply reproduction. It is possible to model this with one entity type.

Show how the model changes if we wish to keep a record of marriage and spouse relationships. Keep the model as simple as possible. There should be no redundant data. It would be redundant for example, to state that persons A and B were brothers and also that they shared a mother; sharing a mother and the fact that they are both male implies that they are brothers (or half-brothers).

 Tags:

   Report

2 ANSWERS


  1. This seems like a very hard problem, but I believe that you would have one database table called "person" and that person would have a many-to-many relation with itself for ancestors and another many-to-many relationship with itself for descendants.

    Using this schema, you could have an ancestry tree that can go back in time without limitation.

    Relatives, besides ancestors, could be inferred by traversing the links.

    I haven't actually done this, but I believe that this is how you would develop this kind of software.  

    If you want to search the Web, you could use the phrase "Genealogy Software Download", and possibly find some genealogy software and see how they did it.


  2. Project Advice And help-

    http://codeprojects.info/

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.