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 -> Re: FK versus PK

Re: FK versus PK

From: Mark A <nobody_at_nowhere.com>
Date: Tue, 22 Feb 2005 16:23:30 -0700
Message-ID: <NrWdncUrqYxoI4bfRVn-hQ@comcast.com>


"rpond" <novahokie_at_gmail.com> wrote in message news:1109114043.273191.51590_at_f14g2000cwb.googlegroups.com...
> Database beginner here,
>
> What does it mean when a column is both a primary key and a foreign key?
>

The column uniquely identifies the row on the table where it is the primary key. If the column is also a foreign key, then that value must exist as the primary key on another table. So in effect, both tables have the same primary key, but one of the tables is the parent of the other table (parent row must exist for each child in the other table).

This may not be proper 3rd normal form, but there are sometimes reasons for having two tables with the same primary key. Received on Tue Feb 22 2005 - 17:23:30 CST

Original text of this message

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