Microsoft Office Tutorials and References
In Depth Information
Is the PositionID field, which is the primary key for the Position table (see Figure A-17),
a natural key? No, the PositionID field is not an inherent characteristic of a position.
Instead, the PositionID field has been added to the Position table only as a way to identify
each position uniquely. The PositionID field is an artificial key , which is a field that you
add to a table to serve solely as the primary key and that is visible to users.
Another reason for using an artificial key arises in tables that allow duplicate records.
Although relational database theory and most experts do not allow duplicate records in a
table, consider a database that tracks donors and their donations. Figure A-18 shows a
Donor table with an artificial key of DonorID and with the DonorFirstName and
DonorLastName fields. Some cash donations are anonymous, which accounts for the fourth
record in the Donor table. Figure A-18 also shows the Donation table with the DonorID
field, a foreign key to the Donor table, and the DonationDate and DonationAmt fields.
Figure A-18
Donor and Donation tables
Donor
prim ary
key
DonorID DonorFirstName
DonorLastName
1
Christina
Chang
2
Franco
Diaz
3
Angie
Diaz
4
Anonymous
5
Tracy
Burns
Donation
DonorID
DonationDate
DonationAmt
1
10/12/2010
$50.00
1
09/30/2011
$50.00
2
10/03/2011
$75.00
4
10/10/2011
$50.00
duplicate records
4
10/10/2011
$50.00
4
10/11/2011
$25.00
5
10/13/2011
$50.00
 
Search JabSto ::




Custom Search