This is difficult. I wish people just kept to nuclear families where we could have simple relationships but it's more complicated now.
I've got the following tables (simplified of course):
columns: family_id, familyname
columns: firstname, lastname, child_id, family_id
columns: firstname, lastname, parent_id, family_id
columns: parent_id, child_id, relationship
Now I know how to get the kids out that are not in relationship at all: select * from child, relationship where relationship.child_id <> child.child_id
But that's not what I want to do. I basically want to say, "find all the kids that are related to parent_id X" and then say "now show me all the kids that are not in that list"
Defining Relationships In A Family
1 reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users