Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Data modelling questions.
Recently I came accross an example database that modelled one-one relationships in a way I have not seen before.
Say I have two entities.
Talent (talent_id, talent_name)
and TalentPhoto (talent_id, talent_photo)
For arguments sake let's make this a one-to-one. In the example they had
schema defined such that there was no foriegn key in Talent pointing to it's associated photo.
thus
Talent (talent_id, talent_name)
TalentPhoto (talent_id, talent_photo)
so they used the same unique identifer for Talent and TalentPhoto to create the association.
.....
Another strange approach that somebody also suggested to me was.
Talent (talent_id, talent_name)
TalentPhoto (talent_photo_id, talent_photo, talent_id)
ie. a back pointer from talentphoto back to the associated talent.
I assume this is appropriate when not other entity would need to associate with a talent photo. Ditto the other approach above. and if you need mulitiple entities associated to a talentPhoto then the prefered approach is a foriegn key in each entity pointing to the talentPhoto.
I would like to read about when each method is appropriate. Are there any references that discuss these issues? Received on Wed Oct 15 1997 - 00:00:00 CDT
![]() |
![]() |