Skip to main content

GATE CSE 2008Databases › ER Modeling & Relational Model FundamentalsVerified

GATE CSE 2008 PYQ: Consider the following ER \text{ER} ER diagram The minimum number of tables needed to represent M M M , N N…

Consider the following ER\text{ER} diagram

GATE CSE 2008 ER Modeling & Relational Model Fundamentals diagram: Consider the following ER \text{ER} ER diagram The minimum n

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

 Which of the following is a correct attribute set for one of the tables for the minimum number of tables needed to represent MM, NN, PP, R1R1, R2R2?

  1. A
    M1,M2,M3,P1{M1, M2, M3, P1}
    Correct answer
  2. B
    M1,P1,N1,N2{M1, P1, N1, N2}
  3. C
    M1,P1,N1{M1, P1, N1}
  4. D
    M1,P1{M1, P1}

Answer

(A) M 1 , M 2 , M 3 , P 1 {M1, M2, M3, P1} M 1 , M 2 , M 3 , P 1

Approach

Apply standard ER-to-relational mapping while minimizing tables. Strong entities M and P become base tables. If relationship R1 is 1:1 or 1:N and has no attributes, merge it into the total-participation entity M by adding P's primary key P1 as a foreign key in M. Weak entity N related to P must have its own table containing its partial key N1, its attribute N2, and owner P's primary key P1, with (P1,N1) as the composite primary key. This gives three tables: M(M1,M2,M3,P1), P(P1,P2), and N(P1,N1,N2).

The minimal ER-to-relational mapping yields 3 tables: M(M1,M2,M3,P1), P(P1,P2), and N(P1,N1,N2). Therefore the correct attribute set for one of those tables is option A, {M1,M2,M3,P1}.

Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.