Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Data modelling questions.

Data modelling questions.

From: Robert Nicholson <steffi_at_shell8.ba.best.com>
Date: 1997/10/23
Message-ID: <62mt7d$rsb$n@195.26.68.21>#1/1

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 Thu Oct 23 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US