Note that the RACE entity contains the primary keys of the HORSE (Horse code) and JOCKEY (Jockey code) entities. The Horse code and Jockey code are needed as attributes in the RACE entity to identify the horses and jockeys that competed in each race. However, neither the Horse code nor the Jockey code are needed to identify the RACE entity; in other words, neither Horse code nor Jockey code are primary keys of RACE. Such non-key attributes of an entity that are primary keys of another entity are known as foreign keys. In the following table, foreign keys are identified.
|
Entity |
Attribute |
Primary Key |
Foreign Key |
|
COURSE |
Course code |
Course code |
N/A |
|
HORSE |
Horse code |
Horse code |
N/A |
|
JOCKEY |
Jockey code |
Jockey code |
N/A |
|
SIRE |
Sire code |
Sire code |
N/A |
|
DAM |
Dam code |
Dam code |
N/A |
|
RACE |
Course code |
Course code |
Horse code |
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|