Primary Key - Exercise
Objective
Create a primary key field in the Clients and Projects tables.
Scoring
You will receive 2 points for this exercise. This exercise is auto-scored, which means all you need to do to receive full credit
is complete the steps and click Submit.
Overview
Neither the Projects table nor the Clients table currently has a primary key. Because tables typically require primary keys to
participate reliably in relationships, you will define a primary key for each table using two different approaches:
(1) selecting an existing field as a key and (2) creating an AutoNumber key.
Instructions
-
Open the Clients table in Design View.
-
Define the Company field as the primary key.
- Click the row selector for Company and click the Primary Key button (key icon).
- If Access warns you about duplicates or blanks, correct the data before continuing.
-
Save the table design and close the Clients table.
-
Open the Projects table in Design View.
-
Create a new field named Project ID and set its data type to AutoNumber.
- Best practice: place the primary key field first. If needed, move Project ID to the top of the field list.
-
Set Project ID as the primary key.
-
Save the table design and close the Projects table.
-
When finished, click Submit to continue to the Exercise Result page.
