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

Home -> Community -> Usenet -> comp.databases.theory -> Primary Keys and Foreign Keys

Primary Keys and Foreign Keys

From: David <no_at_e-mail.com>
Date: Sun, 13 Apr 2003 17:08:23 +0100
Message-ID: <3e998e98$0$4864$cc9e4d1f@news.dial.pipex.com>


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?
Do I need to set Person_ID in Person and House_ID in House as a foreign key to reference the composite key in 'Lives'?

Please could someone help answer these questions

Thank you
David Received on Sun Apr 13 2003 - 11:08:23 CDT

Original text of this message

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