GATE / CS ARCHIVE

GATE CSE 2017 SET 2 / QUESTION 17

GATE CSE 2017 Set 2 Q17

Database Management Systems · Database Models, Architecture & ER Diagrams · Full GATE CSE 2017 Set 2 paper

GATE 2017 Set 2, Q17 1 mark · MCQ
Report issue

Database Models, Architecture & ER Diagrams

Question 17, GATE 2017: In an ER model, entity types A and B are related by R, which has no attributes of its own. When can the relational table for R be merged into A? A:R is one-to-many and A participates totally. B:one-to-many and A participates partially. C:many-to-one and A participates totally. D:many-to-one and A participates partially. Cardinalities are read from A to B.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Our answer: C under nonnullable merge convention

1. Merging R into A means representing an A entity's partner by storing a B key in its row, instead of using a separate relationship row. A single such field can represent at most one B partner for each A. Thus the appropriate direction is many A entities to one B entity, not one A to many B entities.

2. Under the conventional null-free merge rule, every A must have a partner so that each A row has a valid B key. Total participation provides this guarantee. These two conditions yield the intended option C.

3. The wording leaves a modeling caveat: with nullable foreign keys, an A that does not participate can use NULL, so many-to-one with partial participation, D, can also be represented in A. Official C is retained under the nonnullable conventional criterion rather than treating D as impossible in SQL generally.

Original paper, page 7 · Answer key