Skip to content
Official PYQ · 2008

GATE CS 2008 Q82 — ER-model

Explain with AI

Consider the following ER\text{ER} diagram

The minimum number of tables needed to represent MM, NN, PP, R1R1, R2R2 is

Choose one option
View worked solution

Answer: B

To find the minimum number of tables required, we analyze the entities and relationships in the ER diagram:

  1. Entity MM and Relationship R1R1: The arrow from R1R1 to NN indicates a many-to-one relationship from MM to NN. Therefore, the relationship R1R1 can be merged into the table for MM by adding the primary key of NN (N1N1) as a foreign key.
    Table 1: M(M1‾,M2,N1)\text{Table 1: } M(\underline{M1}, M2, N1)
  2. Entity NN: This is a strong entity set and requires its own table.
    Table 2: N(N1‾,N2)\text{Table 2: } N(\underline{N1}, N2)
  3. Weak Entity PP and Identifying Relationship R2R2: PP is a weak entity set (indicated by the double rectangle) with a partial key P1P1 (dashed underline), and R2R2 is its identifying relationship (double diamond). A weak entity set and its identifying relationship are always merged into a single table containing the weak entity's attributes and the owner entity's primary key.
    Table 3: P(N1,P1‾,P2)\text{Table 3: } P(\underline{N1, P1}, P2)

Thus, a minimum of 3 tables are needed to represent the ER diagram.

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

Published
Report a correction
Keep exploringMore ER-model questions