How is the algorithm for family tree in genealogy be done?
For example Parent A has a Children B and C. So, what if Children C produce a Children too in the future. How does it add to the tree by using database?
I've looked on Jit's RGraph tree graph where it populates the tree by using JSON data. I might wanna expand the tree by populating the JSON from a database. But, I couldn't figure out how will the database look like if I add more children to the data. I think it is doable if it was only for JSON. But I can't fully grasp when it comes to dynamic data.
What model/structure is suitable to solve this kind of problem?