The power
of a relational database system such as Microsoft Access
comes from its ability to quickly find and bring together
information stored in separate tables using queries, forms,
and reports. In order to do this, each table should include
a field or set of fields that uniquely identifies each
record stored in the table. This information is called the
primary key of the table. Once you designate a primary key
for a table, Access will prevent any duplicate or null
values from being entered in the primary key fields.
There
are 3 kinds of primary keys that can be defined in Microsoft
Access:
An
AutoNumber field can be set to automatically enter a
sequential number as each record is added to the table.
Designating such a field as the primary key for a table is
the simplest way to create a primary key. If you don't set a
primary key before saving a newly created table, Microsoft
Access will ask if you want it to create a primary key for
you. If you answer Yes, Microsoft Access will create an
AutoNumber primary key