Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Table links and PKs
Design tools I have complain when I try to set up a table with a
multi-field Primary Key (PK) with one field only linked as a Foreign
Key (FK) to the PK of another table.
However this configuration often seems natural to me. Can anyone explain?
Example of how I might choose to use it is in a Contacts telephones table:
CONTACTS
-> Contact_Id PK
| ...Other fields | | PHONES | PhoneNumber PK1 |_ Contact_Id PK2
As multiple contacts may share the same telephone number, PhoneNumber on its own is not an appropriate PK.
Because my design tool complains I usually add a surrogate PK and put a unique index on the two fields above.
Why is the above design perceived as flawed?
Thanks,
Clive.
Received on Tue Aug 06 2002 - 14:01:53 CDT
![]() |
![]() |