Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Name:
Date:
Answer the questions 1 through 9 in the space provided.
I.
1.
2.
For each table, identify the primary key and the foreign key(s). If a table does not
have a foreign key, write None in the space provided.
TABLE
PRIMARY KEY
FOREIGN KEY(S)
EMPLOYEE
STORE
REGION
EMP_CODE
STORE_CODE
REGION_CODE
STORE_CODE
REGION_CODE, EMP_CODE
NONE
Do the tables exhibit entity integrity? Answer yes or no and then explain your
answer.
TABLE
EMPLOYEE
ENTITY INTEGRITY
YES
STORE
YES
REGION
YES
3.
EXPLAIN
Each EMP_CODE value is
unique and there are not
nulls
Each STORE_CODE value
is unique and there are not
nulls
Each EMP_CODE value is
unique and there are not
nulls
Do the tables exhibit referential integrity? Answer yes or no and then explain your
answer. Write NA (Not Applicable) if the table does not have a foreign key.
TABLE
EMPLOYEE
REFERENTIAL INTEGRITY
Yes
STORE
Yes
EXPLANATION
Each STORE_CODE value
in EMPLOYEE points to an
existing
STORE_CODE
value in STORE
Each
REGION_CODE
value in STORE points to
an
existing
REGION_CODE value in
REGION
and
each
EMP_CODE
value
in
STORE points to an existing
EMP_CODE
value
in
EMPLOYEE
REGION
4.
5.
NA
6.
Create the relational diagram to show the relationship between STORE and
REGION.
7.
8.
Draw the ERD to show the relationships among EMPLOYEE, STORE, and
REGION.
9.