Access 2007
Building Table Relationships
Understanding the relationship map
The relationship map lists all of the tables that were selected to relate, and all of the fields that were set up for that table previously. Notice that the first field has a key icon next to it. This is the Primary Key for the table.
Primary and foreign keys
A Primary Key is the first field in each table of the database. You may recall that this field auto-numbers by default, so every record in the table has its own unique number to identify it. Access uses this number to quickly pull information together for you when you run queries or reports, which are covered later.
In the example above, the primary key for the Customers table is Customer ID, the primary key for the Orders table is Order ID, and the primary key for the Books table is Book ID.
A Foreign Key is a field that is the Primary Field in its own table but that shows up in another table. If you look closely at the Orders table, the fields Customer ID and Book ID appear there, as well as in their own respective tables. These fields are the primary key in their own tables, but in the Orders table, they are considered Foreign Keys.