I want to create tree-view for display or show family member's relation. For this I created 3 tables i.e following.
familyDetails->[f_id,fname,lname] relations -> [r_id,relation] .....//e.g father,mother,son,etc. familyRelations ->[fr_id,fk_f_id1,fk_r_id,fk_f_id2] //to show A is Father OF b.
Here problem is, if I say A is father OF B and C than it'll make one entry in
familyRelations table. But here it will also create one more entry for B is daughter of A. So in opposite relation (e.g father->son or son->father, etc )
it'll create entry for all case.
So if there are N no of people in family then it'll create N * N entries in familyRelations table.
How to define relationship with other members. This flow is right or need to change? I am confused in this.
So how to solve this problem. Or is there any another way?