Creating Family Tree Realtion using PHP and MySQL
Posted: Tue Jan 16, 2007 3:50 am
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.
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.