Re: primary and foregin keys

From: vldm10 <vldm10_at_yahoo.com>
Date: 29 Dec 2004 21:59:07 -0800
Message-ID: <1104386347.292526.110860_at_z14g2000cwz.googlegroups.com>


Maybe it isn't a bad idea to list in which roles the Primary Key
(PK) can appear; here are some of them:

  1. As "unique" - In this "role" PK is a unique identifier for a tuple.
    (However there are commercial non-relational databases

with duplicate key possibilities).

2. As a pair (PK, FK) - This case is interesting regarding your inquiry.
As previous discussion shows, FK must reference the whole of a PK or unique key in "parent" table.

3. As "preferable" - For example, in products table can be three keys
and we can use any key to refer to a tuple. But if you announce prodid to be PK,then DBMS expects (prefers) that the tuple will be referred to via PK.In this case

the software manufacturer can associate an appropriate

software for PK (prodid), maybe an index, etc.

4. Meaning of the pair (PK,FK) - Pair (PK, FK) has a meaning in the "real world"

Vladimir Odrljin Received on Thu Dec 30 2004 - 06:59:07 CET

Original text of this message