I
Ilan Sebba
Hello to all
I have a parent table called party. This has a one to one relationship with
different types of parties, eg BirthdayParty, WeddingParty, Funeral (not a
happy party).
My problem is this, if I have a party with an ID = 1, then I want there to
be only one 'child' party using that ID. In other words I want this: 'give
me the ID number of the 'parent party' and I will find the corresponding
'child' party. Right now, I can have a funeral and a wedding both using the
same Party.ID. I am sure you will agree, the two should not be mixed up.
Her is what my table design looks like:
tblParty
PartyID [Primary Key]
FieldsAttributableToAllParties
tblBirthday
PartyFK [one to one, enforce referencial integrity, no cascade update or
delete] [Also serves as primary key for this table]
FieldsAttributableToBirthdayParties
tblWedding
PartyFK [one to one, enforce referencial integrity, no cascade update or
delete] [Also serves as primary key for this table]
FieldsAttributableToWeddings
tblLotsOfOtherPartyTable
... same structure as tblBirhday and tblWedding
Right now for each record in tblParty, I can also have one record in each of
tblBirthday, tblWedding etc. I don't want this. If I have a record in
table Party, that record should belong to only one other record in all the
the other tables.
Many thanks for your suggestions (kindly use layman's language)
Ilan
I have a parent table called party. This has a one to one relationship with
different types of parties, eg BirthdayParty, WeddingParty, Funeral (not a
happy party).
My problem is this, if I have a party with an ID = 1, then I want there to
be only one 'child' party using that ID. In other words I want this: 'give
me the ID number of the 'parent party' and I will find the corresponding
'child' party. Right now, I can have a funeral and a wedding both using the
same Party.ID. I am sure you will agree, the two should not be mixed up.
Her is what my table design looks like:
tblParty
PartyID [Primary Key]
FieldsAttributableToAllParties
tblBirthday
PartyFK [one to one, enforce referencial integrity, no cascade update or
delete] [Also serves as primary key for this table]
FieldsAttributableToBirthdayParties
tblWedding
PartyFK [one to one, enforce referencial integrity, no cascade update or
delete] [Also serves as primary key for this table]
FieldsAttributableToWeddings
tblLotsOfOtherPartyTable
... same structure as tblBirhday and tblWedding
Right now for each record in tblParty, I can also have one record in each of
tblBirthday, tblWedding etc. I don't want this. If I have a record in
table Party, that record should belong to only one other record in all the
the other tables.
Many thanks for your suggestions (kindly use layman's language)
Ilan