Skip to content
Official PYQ · 2017

GATE CS 2017 Set 2 Q17 — ER-model

Explain with AI

An ER model of a database consists of entity types AA and BB. These are connected by a relationship RR which does not have its own attribute. Under which one of the following conditions, can the relational table for R be merged with that of A?

Choose one option
View worked solution

Answer: C

To determine when the relational table for a relationship RR between entity types AA and BB can be merged with the table for AA, we analyze the cardinality and participation constraints:

  1. Cardinality Constraint (Many-to-One from AA to BB):

    For the relationship RR to be merged into the table of AA, each entity in AA must be associated with at most one entity in BB. This ensures that we can represent the relationship by simply adding the primary key of BB as a foreign key in the table of AA without violating the First Normal Form (1NF). This corresponds to a many-to-one relationship from AA to BB (where AA is on the "many" side).

  2. Participation Constraint (Total Participation of AA):

    If the participation of AA in RR is total, every entity in AA must be associated with at least one entity in BB. Combined with the many-to-one constraint, this means every entity in AA is associated with exactly one entity in BB. Consequently, the foreign key column in the merged table for AA will never contain NULL values.

    If the participation of AA were partial, some entities in AA would not be associated with any entity in BB, leading to NULL values in the foreign key column.

Thus, the table for RR can be seamlessly merged with AA when the relationship RR is many-to-one (from AA to BB) and the participation of AA in RR is total.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore ER-model questions