Database banner image.

The Primary Key of a table is the field that contains the value which uniquely identifies each record in that table.

The Primary Key of a record:

  • Is required (cannot be left blank)
  • Must be unique

It follows then that in Access (and other databases), that more often than not, the Primary Key is set to Autonumber as this ensures that a unique number will automatically be inserted in the Primary Key field each time a new record is added to the table.

A table does not need to have a Primary Key, although there almost always is one. This is partly because the Primary Key is indexed: the index of a table is an important feature that enables the database application to perform operations such as searches and sorts. Because it is used as the index (or one of the table’s indexes) it is best that the Primary Key is a number and that it is as short as possible (a field can be indexed without being the Primary Key).

A Primary Key is usually one field, but can in fact be multiple fields (this is not within the CAT syllabus).

By MisterFoxOnline

CAT Educator

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.