Database Reference
In-Depth Information
P HONE from the table for two reasons: The primary key does
not exclusively identify its current value and (as you've prob-
ably already ascertained) it is an unnecessary field. As it turns
out, you can discard this field completely because it is already
part of the EMPLOYEES table structure.
After you've removed the unnecessary fields you identified during this test, examine the
revised table structure and make sure it complies with the Elements of the Ideal Table.
The primary key should now exclusively identify the values of the remaining fields in the
table.Thismeansthattheprimarykeyistrulysoundandyoucandesignateitastheofficial
primary key for the table. Remove the “CK” next to the field name in the table structure
and replace it with a “PK.” (A primary key composed of two or more fields is known as
a composite primary key, and you mark it with the letters “CPK.”) Figure 8.7 shows the
revised structure of the SALES INVOICES table with I NVOICE N UMBER as its primary key.
Figure 8.7. The revised SALES INVOICES table with its new primary key
As you create a primary key for each table in the database, keep these two rules in mind:
Search WWH ::




Custom Search