GateAI
ER Model

GATE CSE 2015 Set 1 · Q41

NAT2 marksEasy

Time

Consider an Entity-Relationship (ER) model in which entity sets E1E_1 and E2E_2 are connected by an m:nm:n relationship R12R_{12}. E1E_1 and E3E_3 are connected by a 1:n1:n (1 on the side of E1E_1 and nn on the side of E3E_3) relationship R13R_{13}. E1E_1 has two single-valued attributes a11a_{11} and a12a_{12} of which a11a_{11} is the key attribute. E2E_2 has two single-valued attributes a21a_{21} and a22a_{22} of which a21a_{21} is the key attribute. E3E_3 has two single-valued attributes a31a_{31} and a32a_{32} of which a31a_{31} is the key attribute. The relationships do not have any attributes. If a relational model is derived from the above ER model, then the minimum number of relations that would be generated if all the relations are in 3NF is _______.

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 4

ER Model

To convert the given ER diagram to a relational model with minimal tables in 3NF:

  1. Entity Set E1E_1:

    • Has attributes a11a_{11} (primary key) and a12a_{12}.

    • Generates relation: T1(a11‾,a12)T_1(\underline{a_{11}}, a_{12}).

  2. Entity Set E2E_2:

    • Has attributes a21a_{21} (primary key) and a22a_{22}.

    • Generates relation: T2(a21‾,a22)T_2(\underline{a_{21}}, a_{22}).

  3. Relationship R12R_{12} (m:nm:n between E1E_1 and E2E_2):

    • An m:nm:n relationship cannot be merged into either entity table without violating 1NF/introducing NULL values or redundancy.

    • Generates a separate relation with the composite primary key: T12(a11,a21‾)T_{12}(\underline{a_{11}, a_{21}}).

  4. Relationship R13R_{13} (1:n1:n from E1E_1 to E3E_3) and Entity Set E3E_3:

    • Since each entity in E3E_3 is related to at most one entity in E1E_1, the relationship R13R_{13} can be merged into the entity relation of E3E_3 by including the primary key of E1E_1 (a11a_{11}) as a foreign key.

    • Generates relation: T3(a31‾,a32,a11)T_3(\underline{a_{31}}, a_{32}, a_{11}).

Thus, the minimum number of relations required is 4 [p. 17, Q. 48].

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This ER Model previous year question is Q41 of the GATE CSE 2015 Set 1 paper. Find more GATE CSE PYQs on ER Model in Databases, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related ER Model PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

ER Model in GATE CSE

ER Model has 8 GATE CSE PYQs across 8 papers from 2012 to 2026. This is the only 2-mark NAT question among them, and it is the only one in GATE CSE 2015 Set 1.

How GATE tests ER Model

More from GATE CSE 2015 Set 1

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2015 Set 1 · Q41 · NAT

Consider an Entity-Relationship (ER) model in which entity sets E1 and E2 are connected by an m:n relationship R12. E1 and E3 are connected by a 1:n (1 on the side of E1 and n on the side of E3) relationship R13. E1 has two single-valued attributes a11 and a12 of which a11 is the key attribute. E2 has two single-valued attributes a21 and a22 of which a21 is the key attribute. E3 has two single-valued attributes a31 and a32 of which a31 is the key attribute. The relationships do not have any attributes. If a relational model is derived from the above ER model, then the minimum number of relations that would be generated if all the relations are in 3NF is …

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.