Include as foreign keys, in the relation of one entity type, the primary keys of the other entity type
Include also the simple attributes of the relationship type
If possible, the first entity type should have total participation in the relationship (to save memory!)
DEPARTMENT
MANAGER-SSN
StartDate
Binary 1:N Relationship Types into Foreign Keys
Add as foreign keys, to the relation of the entity type at the N side, the primary keys of the entity type at the 1 side
(don’t duplicate records!)
Include also the simple attributes of the relationship type
EMPLOYEE
SupervisorSSN
Binary M:N Relationship Type into Relation
We don’t want to duplicate records!
Set as foreign keys the primary keys of the participating entity types
Include the simple attributes of the relationship type
WORKS-FOR
EmployeeSSN
DeptNumber
N-Ary Relationship Type
Similar to binary M:N relationship type
Multivalued Attribute into Relation
Include the given attribute
Include as foreign keys the primary attributes of the entity/relationship type owning the multivalued attribute
Keys not designated within primary keys are to be mentioned as such in side comments
DEP-LOCATION
Location
Resembles the treatment of a relationship type.
Weak Entity+Relationship Types into Relation
Include simple attributes
Add the owner’s primary key attributes, as foreign key attributes
Declare into a primary key the partial keys of the weak entity type combined with those imported from the owner
DEPENDENT
Relationship
Reference: Ch. 7.1 in textbook.
9.4 Assignment #5
Due: Mo, Feb 16
Problem 7.4 from textbook (page 204 4th ed; 237 5th ed).
Notes
If you submit your homework electronically, use the departmental submit utility: submit XXX lab5filename. XXX represents ‘c670aa’ for students of the 3:30 section, and ‘c670ab’ for students of the 5:30
section.
Files are restricted to 1,048,576 bytes
The submit program issues error messages to the student’s CSE email account