ER-to-Relational Mapping and DDL
CS340 · Chapter 5
1
The 7-step ER-to-relational mapping algorithm (strong and weak entities, 1:1, 1:N and M:N relationships, multivalued attributes, n-ary relationships), basic DDL (CREATE TABLE, keys, foreign keys, data types, constraints), and step 8 options for mapping specialization.
Asked in a real exam
The primary key of a relation mapped from a weak entity is:
Correct: Owner’s PK + the partial key.
Which defines a foreign key?
Correct: FOREIGN KEY (Dno) REFERENCES DEPARTMENT(Dnumber).
For 1:1 MANAGES where DEPARTMENT participates totally, the FK goes in:
The total side avoids NULLs.
EMPLOYEE (N) works for DEPARTMENT (1). Map it by:
Correct: Adding Dno as a foreign key in EMPLOYEE.
WORKS_ON (M:N, attribute Hours) becomes:
Correct: WORKS_ON(Essn, Pno, Hours) with PK (Essn, Pno).
Mapping option that uses ONE relation with a Boolean flag per subclass suits:
Correct: Overlapping subclasses.
No slides match this filter.