[thelist] database eating brain...

Bert Szoghy BertS at Escom.ca
Wed Jul 5 12:24:30 CDT 2000


>... how is it that you have more than one item marked
> as the primary key in the tables above? I thought each table
> could only have one primary key. Does that mean that they're
> primary keys in a different table? If so, could they also be listed
> as foreign keys?

a primary key is *one or more* columns that determine row uniqueness

when the table has an autonumber primary key, it's gonna be unique, that's
one (of several) of the attractions of using autonumber pks

Hello, If I may jump in here. Being employed as a database dude, I wanted to
mention the fact that using multiple columns as a PK if fine -- but it
becomes a nightmare if you tack on new functionality and new columns to the
table: suddenly you get duplicate primary keys because business rules have
changed.

Some programmers like me put in autonumber primary keys with religious zeal
--  because they've been burned by other people's bad designs before. 

--Bert Szoghy
Escom Software




More information about the thelist mailing list