Skip to content
Advertisement

Create Children and Parent of a Person

I have the following Type Address and PhoneNumber:

If a person can have many children and a child can have only 2 persons as parents what are the modification I need to have in my Person type below :

Is to correct to have a self reference (Father and Mother) to the same type?

Advertisement

Answer

Is to correct to have a self reference (Father and Mother) to the same type?

Yes, they are all person.

If a person can have many children and a child can have only 2 persons as parents what are the modification I need to have in my Person type below:

See the answer to your previous question:

db<>fiddle here

a child can have only 2 persons as parents

A child can only have 2 people as biological parents; however, it is pretty common these days for parents to separate and enter new relationships and a child may have many step-parents or the parents could give birth via surrogacy.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement