Previous Topic: Step 2: Defining the Columns for Each TableNext Topic: Step 4: Establishing Join Columns


Step 3: Specifying the Unique Keys

What Is a Unique Key

A column or combination of columns is designated as a unique key to uniquely identify each row in a table. By establishing a unique key, you prevent duplicate rows from being stored in a table.

At Acme Insurance, each job in the company is given a unique job number, so Fran designates the JOB NUMBER column as the unique key for the JOB table.

A Concatenated Key

Since an applicant can apply for more than one position, and more than one applicant can have the same name, Fran decides that the NAME column is not sufficiently unique to serve as the unique key for the APPLICANT table. However, the NAME column combined with the PHONE NUMBER column and POSITION APPLIED FOR column is unique and can be the unique key for the APPLICANT table. This unique key is also called a concatenated key since it is a concatenation of three columns.

Views do not Have Unique Keys

A view cannot have a unique key since data is not actually stored in a view, but in the source tables from which the view is derived. Therefore, no unique key is specified for the JOBS AND APPLICANTS view.