V
V
vanyau_m2021-07-21 23:23:36
Database design
vanyau_m, 2021-07-21 23:23:36

How to design a family tree database?

Good day!
I am engaged in increasing the skill and understanding of the basics of database design. I came across an interesting task, which has not yet been solved, and now I want a certain view from the outside:

The task is simple: to present the family tree in the form of a database, so that all connections between the parent and his descendant can be traced.

At the moment, I think the solution will look like this:
Table 1 - Person
id
name
birth
death
sex
child (fk-id)

Table 2 - Descendant
id_child (FK - child)
name

PS name field indicated for simplicity, replaces the full name. It is also interesting to know the opinion why my scheme is not viable and how it can be improved / finalized.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Armenian Radio, 2021-07-21
@vanyau_m

One table
id, name, parent1, parent2, any_other_stuff is enough...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question