Hi Everybody,
I am on a project, where I have to display a Family Tree structure (A HIRERCHICAL structure). Primarily I have started with "Adjacency List Model" and also with the B-Tree PreOrder traversing. But Both concepts require a unique root and its corresponding children. But these concepts are not meeting with my client details.
As per my client details, there should be different node for MOTHER as well as for FATHER, and under these two nodes, their coressponding siblings(childrens) should be displayed(On the other hand, the B-Tree structure requires only one root(either MOTHER or FATHER) ).
Therefore, I am finding myself in trouble.
If somebody outhere can design or explain table structure in MySQL to overcome to this issue.
Thanks in advance.
Creating Family Tree Realtion using PHP and MySQL
Moderator: General Moderators
- CoderGoblin
- DevNet Resident
- Posts: 1425
- Joined: Tue Mar 16, 2004 10:03 am
- Location: Aachen, Germany
Hi Goblin.CoderGoblin wrote:Can't you use the "root" but just hide it as a root type (flag in the database ?). Any Route node would never be shown/processed.
I will try with your given idea. But can u give me an idea how many relation(s) will it require to implement the above mentioned concept. As far as my knowledge, It will require 3 Relations(Tables).
[which is quite contrary to my client, that he is saying that it should be implement under one Relation, which I think its not going to be possible ].
Anyways Thanks, coming with more.
Bye.