Don't forget that a primary key does not need to be a single column. A table
must have at least one candidate key, which can be one or a set of columns,
possibly even all columns in the table. Take a look at the Order details
table in the sample Northwind database; you'll see that its primary key is
made up of the OrderID and ProductID columns. When a surrogate prmary key
is introduced for reasons of convenience there will usually be a natural
candidate key already, e.g. a CityID autonumber column might be introduced
into a Cities table to cater for duplicate city names, but there will
probably be a candidate key of City and State already, or even of more
columns if city names can be duplicated within a single state (despite having
a grandmother from Boston, Mass., my knowledge of US geography is deficient
on this point, I'm afraid) For a discussion on the use of surrogate keys
(e.g. an autonumber) versus natural keys see the compilation by Joe Celko of
threads from the old CompuServe CASE forum at:
http://community.netscape.com/n/pfx/forum.aspx?msg=19495.1&nav=messages&webtag=ws-msdevapps
Ken Sheridan
Stafford, England