GATE / CS ARCHIVE

GATE CSE 2015 SET 1 / QUESTION 48

GATE CSE 2015 Set 1 Q48

Database Management Systems · Database Models, Architecture & ER Diagrams · Full GATE CSE 2015 Set 1 paper

GATE 2015 Set 1, Q48 2 marks · NAT
Report issue

Database Models, Architecture & ER Diagrams

Question 48, GATE 2015: Entities E1,E2,E3 have single-valued attributes (a11 key,a12),(a21 key,a22),(a31 key,a32). E1–E2 has m:n relationship R12; E1–E3 has 1:n R13, n on E3 side. Relationships have no attributes. Find minimum relations when all are in 3NF.
Tap to enlarge
Answer & solution

Official answer: 4

Construct E1(a11,a12), E2(a21,a22), E3(a31,a32,a11), and R12(a11,a21). E3's added a11 foreign key records its single associated E1 without a separate R13 table. R12 needs a separate association relation because either entity may participate in multiple pairs. Given only the stated dependencies, these four relations meet 3NF; merging an entity's nonkey attributes into R12 would introduce redundant dependencies.

Solution: Use one relation for each of the three entity types. Implement the 1: n relationship by a foreign key on the n side, requiring no extra relation. The m: n relationship needs its own relation containing the participating keys. Thus four relations suffice under the displayed constraints.

Original paper, page 18 · Answer key