Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to design database for family tree,retrieve and display
Posted
Updated 17-Apr-11 21:10pm
v2
Comments
Sandeep Mewara 15-Apr-11 6:47am    
No effort.

I would set up two tables.
[persons_table]
personId (primary key), name, firstname and all the meta data you need

[relations_table]
personId1,personId2,relation

With this you have a 1:n relation between [persons_table] and [relations_table]
As Manfred stated in his comment, this is a n:m relation of person_table on itself.
 
Share this answer
 
v2
Comments
Manfred Rudolf Bihy 18-Apr-11 3:20am    
What you describe is actually an n:m relation an not 1:n plus it's not a relation between persons_table and relations_table but rather a n:m relation of person_table on itself.
Michel [mjbohn] 18-Apr-11 4:02am    
Well, I must admit your right :)
Manfred Rudolf Bihy 18-Apr-11 4:24am    
Just correct your solution and leave a comment. I'll come back later to cast a vote.
(I haven't voted yet!)
try this link

Click[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900