GATE / CS ARCHIVE

GATE CSE 2008 / QUESTION 82

Minimum relations for an ER diagram

Database Management Systems · Database Models, Architecture & ER Diagrams · Full GATE CSE 2008 paper

GATE 2008, Q82 2 marks · MCQ
Report issue

Database Models, Architecture & ER Diagrams

Question 82, GATE 2008: An ER diagram has strong entities M with attributes M1 (key), M2,M3, and P with attributes P1 (key),P2. Relationship R1 is many-to-one from M to P, with total participation of M. N is a weak entity with partial key N1 and attribute N2. Its identifying relationship R2 is many-to-one from N to owner P, with total participation of N. Neither relationship has attributes. What is the minimum number of tables in the standard relational mapping?

(A) 2
(B) 3
(C) 4
(D) 5
Question 82, GATE 2008: An ER diagram has strong entities M with attributes M1 (key), M2,M3, and P with attributes P1 (key),P2. Relationship R1 is many-to-one from M to P, with total participation of M. N is a weak entity with partial key N1 and attribute N2. Its identifying relationship R2 is many-to-one from N to owner P, with total participation of N. Neither relationship has attributes. What is the minimum number of tables in the standard relational mapping?

(A) 2
(B) 3
(C) 4
(D) 5
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

1. Use three relations: P(P1,P2), M(M1,M2,M3,P1), and N(P1,N1,N2). R1 is many-to-one from M to P with total participation of M, so a P1 foreign key in M represents it without a separate relationship table.
2. N is weak, R2 is its identifying many-to-one relationship with P, and N1 is the partial key; include P1 in N, whose primary key is (P1,N1). Thus the standard ER-to-relational mapping needs three tables, option B.

Original paper, page 18