Data Manipulation  «Prev  Next»

Primary Key - Exercise

Understanding the primary key

Objective: Create a primary key field in the Projects and Clients tables.

Exercise Scoring

You will receive 2 points for this exercise. The exercise is auto-scored, which means all you need to do to receive full credit for the exercise is click the Submit button.

Overview

Neither the Projects table nor the Clients table currently has a primary key. Since every table needs a primary key if it is going to be linked with other tables in the database, you will create one for both of these tables.

Instructions

  1. Open the Clients table. Define the Company field as the primary key.
  2. Save the table design and close the table.
  3. Open the Projects table.
  4. Create a new field in the Projects table Design view called Project ID, make this field an AutoNumber field. Traditionally, the Primary Key field is the first field in the table, so you might want to insert or move this new field so that appears first.
  5. Once you have created the new field, make it the primary key.
  6. Save the table design and close the table.