IAE Academy

GATE 2018 CS Q.11: solution and answer

GATE 2018 · CSQ.11 · 1 mark · MCQ

In an Entity-Relationship (ER) model, suppose is a many-to-one relationship from entity set E1 to entity set E2. Assume that E1 and E2 participate totally in and that the cardinality of E1 is greater than the cardinality of E2.

Which one of the following is true about ?

  1. (A)

    Every entity in E1 is associated with exactly one entity in E2.

  2. (B)

    Some entity in E1 is associated with more than one entity in E2.

  3. (C)

    Every entity in E2 is associated with exactly one entity in E1.

  4. (D)

    Every entity in E2 is associated with at most one entity in E1.

See the question in the paper

Answer and solution

ANSWER

Option (A): every entity in E1 is associated with exactly one entity in E2.

Official answer: ASource: Official answer key, GATE 2018 CS (IIT Guwahati)

  1. A many-to-one relationship from E1 to E2 means each entity of E1 is related to at most one entity of E2, while one entity of E2 may be related to many entities of E1.

  2. E1 participates totally in , so every entity of E1 appears in at least one relationship instance. Together with the at-most-one rule, every entity of E1 is associated with exactly one entity of E2. This is option (A), so (A) is true.

  3. Option (B) says some E1 entity is associated with more than one E2 entity. This contradicts the many-to-one constraint, so (B) is false.

  4. Since and every E1 entity maps to exactly one E2 entity, the pigeonhole principle forces at least one E2 entity to be associated with two or more E1 entities.

  5. So (D), 'every entity in E2 is associated with at most one entity in E1', is false: that E2 entity has two or more partners. (C), 'every entity in E2 is associated with exactly one entity in E1', is false for the same reason.

  6. Only (A) must be true.

KEY IDEA

Many-to-one from E1 to E2 gives at most one partner in E2 for each E1 entity. Total participation of E1 raises this to exactly one. The condition then forces some E2 entity to have several E1 partners.

WATCH OUT FOR

Reading 'many-to-one' as only 'at most one' and missing that total participation makes it exactly one. Another slip is to keep (D) because it sounds like a many-to-one condition, when the cardinality condition in fact makes it false.

From the GATE 2018 CS paper. Every question of this paper · Download the full paper · All 5 ER model questions, with notes

More ER model questions