Page 75, problems 1 - 3 and Additional problems on handout.
1.
DEPARTMENT EMPLOYEE
Primary Key Dept_code Emp_codeForeign Key Dept_Mgr Dept_code
2.
Yes, the both tables exhibit referential integrity. The foreign
key in the EMPLOYEE table is either null, indicating the employee
is not assigned to a department, or it matches the primary key
in the Department table. Likewise the foreign key in the DEPARTMENT
table matches the primary key in the EMPLOYEE table.
3
Additional handout:
1.
BONBONS BOXES BOX DETAILS
Primary Key Bonbon ID Box ID Box ID, Bonbon ID Foreign Key None None Box ID, Bonbon ID
2
3. Yes, BOX DETAILS is the linking table between BOXES and BONBONS.
There is a M:N relationship between BONBONS and BOXES. A particular
bonbon, such as B01 might appear in more than one of Sweet Lil's
candy collection boxes. And a particular box collection, such
as SWE2 might have than one type of bonbon contained in it (in
this case it contains B01 and B02).