Billy K said:
I have never heard of the term composite primary key. What are some more
benfits?
I just came across an example database on the Internet which had multiple
primary keys. The table I am building has multiple fields regarding the one
item. I then have other tables that I would like linked back to this table.
This is why I was after multiple primary keys.
The table you saw has ONE Primary Key that consists of multiple fields. There
is no such thing as a table with multiple PKs.
Many (likely most) developers these days use a surrogate field (like AutoNumber)
as their PK and therefore rarely use a composite PK. However; when using
natural keys for the PK you often don't have a single field that constitutes
uniqueness of the record. In those case you have to use as many fields as
required to guarantee that no two records will have duplicates in a combination
of those fields. That is a composite PK. For example in a table holding people
data you might use a combination of FirstName, LastName, and Birthdate as the
PK. While consisting of three fields, this is still a single PK.