Inside a database wouldso would i model the next scenario
I've got a table known as Persons which relates to others. What's tricky is 2 things
1)I have to track the kind of relationship(so i've got a payload many to a lot of self referencing relationship)
2) Sometimes the connection is shaped like there buddies, but sometimes it is a father and boy and i have to have the ability to know who the daddy would be to one individual and who the boy would be to your partner.
Here's what i figured of :
I'd possess a table known as Associations which may be the following:
RelationshipID Person1ID Person2ID RelationshipType1to2- this could say the kind of relationship when going from one to two RelationshipType2to1 this could say the kind of relationship when going from 2 to at least one.
I will have to load within the relationship for any given person, and so i will have to try looking in both Person1ID and Person2ID for any match and add it to the datagrid(i am using wpf) using the appropriate column based on whether or not this thought it was in Person1 or Person2.
It is possible to better method of doing this or something like that i am missing it simply does not feel so right.
Incidentally i am while using entity framework 4.