| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Primary Keys and Foreign Keys
On Sun, 13 Apr 2003 17:08:23 +0100, "David" <no_at_e-mail.com> wrote:
>I am trying to write SQL statements for the following tables.
>
>Person (Person_ID, Name, Age, Interests)
>House (House_ID, Name/Number, Address, City)
>Lives (Person_ID,House_ID, Time_Lived_At_House)
>
>In the 'Lives' table, I have defined Person_ID and House_ID as a composite
>primary key, is this correct?
It depends. What you've done means that a person can live in a particular house once and only once. That might be true for you, but it's not true in the general case.
-- Mike Sherrill Information Management SystemsReceived on Tue Apr 15 2003 - 16:59:33 CDT
![]() |
![]() |