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 -> Table links and PKs

Table links and PKs

From: CliveW <clivew_at_clivewalden.com>
Date: 6 Aug 2002 12:01:53 -0700
Message-ID: <a7e7de55.0208061101.51be1569@posting.google.com>


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

Original text of this message

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