Family Tree :- myheritage.com
Posted
by Nitesh Panchal
on Stack Overflow
See other posts from Stack Overflow
or by Nitesh Panchal
Published on 2010-05-11T12:21:05Z
Indexed on
2010/05/11
12:24 UTC
Read the original article
Hit count: 280
family-tree
Hello, The other day i just accidently visited the site myheritage.com. I was just wondering, how they must have created one? Can anybody tell me what can be their database design? and if possible, algorithm that we can use to generate such a tree?
Generating simple binary tree is very easy using recursion. But if you have a look at the site(if you have time please make account on it and add few nodes to feel) when we add son to a father, it's mother is automatically added(if you don't add explicitly). Mother's family tree is also generated side by side and many such fancy things are happening. In a simple binary tree we have a root node and then many nodes below it. Thus we cannot show wife and husband in the tree and then show a line from wife and husband to child.
In spare time, can anybody discuss what can be it's database design and the recursive algorithm that we can follow to generate it?
I hope i am not asking too much from you :).
© Stack Overflow or respective owner