Re: foreign vs primary key

From: David Cressey <david_at_dcressey.com>
Date: Thu, 20 Sep 2001 11:29:26 GMT
Message-ID: <qqkq7.39$h4.804_at_petpeeve.ziplink.net>


Mikeg,

> I have read a number of texts regarding the terms foreign and primary keys
> but I just can't get a feel for their uses.

The foreign keys and primary keys work together.

A primary key identifies a row, based on (part of) its content.

A foreign key references a row which has the matching primary key.

The use of a foreign key establishes a linkage between the row where the foreign key appears, and the row with the matching primary key.

Establishing linkages without embedding pointers in the data is what makes the relational system so flexible.

--
Regards,
    David Cressey
    www.dcressey.com
Received on Thu Sep 20 2001 - 13:29:26 CEST

Original text of this message