Use the database shown in Figure 2 to work Problems 6-8. Note that the database is
composed of four tables that reflect these relationships:
• An EMPLOYEE has only one JOB_CODE, but a JOB_CODE can be held by many
EMPLOYEES.
• An EMPLOYEE can participate in many PLANs, and any PLAN can be assigned to many
EMPLOYEES.
Note also that the M:N relationship has been broken down into two 1:M relationships for which
the BENEFIT table serves as the composite or bridge entity.
Table name: EMPLOYEE
Database name: Ch03_BeneCo
Table name: BENEFIT
EMP_CODE PLAN_CODE
EMP_CODE EMP_LNAME JOB_CODE
14 Rudell 2
15 2
15 McDade 1
15 3
16 Ruellardo 1
16 1
17 Smith 3
17 1
20 Smith 2
17 3
17 4
20 3
Table name: JOB
JOB_CODE JOB_DESCRIPTION
1 Clerical
2 Technical
3 Managerial
Table name: PLAN
PLAN_CODE PLAN_DESCRIPTION
1 Term life
2 Stock purchase
3 Long-term disability
4 Dental
6. For each table in the database, identify the primary key and the foreign key(s). If a table does
not have a foreign key, write None.
7. Do the tables exhibit entity integrity? Answer yes or no, and then explain your answer.
8. 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.