ER Model · Databases
11 questions · asked in 8 of 27 years (2000–2026)
MCQ 10 · NAT 11-mark 8 · 2-mark 3
2000Questions per year2026
Questions 6–10 of 11
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 _______.
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 _______.
Answer: 4
Go through each part of the model:
- E1(a11, a12) and E2(a21, a22): each entity set gives one relation.
- R12 is m:n, so it needs a relation of its own with (a11, a21).
- R13 is 1:n, so no separate table is needed. Put a11 in E3 as a foreign key: E3(a31, a32, a11).
Total = 4
Answer: 4
- E1(a11, a12) and E2(a21, a22): each entity set gives one relation.
- R12 is m:n, so it needs a relation of its own with (a11, a21).
- R13 is 1:n, so no separate table is needed. Put a11 in E3 as a foreign key: E3(a31, a32, a11).
Total = 4
Answer: 4
Given the basic ER and relational models, which of the following is INCORRECT?
Answer: (C)
The ER model allows an attribute to be multi-valued or composite. A relational table (1NF) allows only one atomic value or NULL for each attribute in a row.
Answer: In a row of a relational table, an attribute can have more than one value
Answer: In a row of a relational table, an attribute can have more than one value
Consider the following ER diagram
Which of the following is a correct attribute set for one of the tables for the minimum number of tables needed to represent M, N, P, R1, R2?
Which of the following is a correct attribute set for one of the tables for the minimum number of tables needed to represent M, N, P, R1, R2?
Answer: (A)
Entities , and each need a table, but a relationship can often be folded into one of them.
R1: the arrow towards means each is related to at most one , so R1 is many-to-one. has total participation (double line), so every has exactly one . R1 has no attributes, so no table is needed for it. Add the key of to as a foreign key that references .
R2: is a weak entity (double box) with partial key , identified through by the identifying relationship R2 (double diamond). Its table holds the key of , so R2 also needs no table of its own.
Minimum tables, 3 in all:
M() with key , references
P() with key
N() with key , references
Of the options, only is one of these tables. (B), (C) and (D) leave out attributes of or mix attributes of and .
Answer: (A)
R1: the arrow towards means each is related to at most one , so R1 is many-to-one. has total participation (double line), so every has exactly one . R1 has no attributes, so no table is needed for it. Add the key of to as a foreign key that references .
R2: is a weak entity (double box) with partial key , identified through by the identifying relationship R2 (double diamond). Its table holds the key of , so R2 also needs no table of its own.
Minimum tables, 3 in all:
M() with key , references
P() with key
N() with key , references
Of the options, only is one of these tables. (B), (C) and (D) leave out attributes of or mix attributes of and .
Answer: (A)
Consider the following ER diagram
The minimum number of tables needed to represent M, N, P, R1, R2 is
The minimum number of tables needed to represent M, N, P, R1, R2 is
Answer: (B)
In the diagram, M and P are strong entities, N is a weak entity, R1 is a relationship from M to P, and R2 is the identifying relationship between N and P.
- R1: the arrow towards P means many M to one P, and R1 has no attribute. So no table is needed for R1. We put the key of P (P1) into the table of M as a foreign key. M's participation is total (double line), so every M has a P1 value.
- N: a weak entity needs its own table with the key of P, because N1 is only a partial key. The identifying relationship R2 (many N to one P) is covered by this key, so R2 needs no separate table.
- P: its own table.
The tables are:
M(M1, M2, M3, P1): M1 is the primary key, P1 is a foreign key to P
P(P1, P2): P1 is the primary key
N(P1, N1, N2): (P1, N1) is the primary key, P1 is a foreign key to P
So 3 tables are needed.
Answer: (B)
- R1: the arrow towards P means many M to one P, and R1 has no attribute. So no table is needed for R1. We put the key of P (P1) into the table of M as a foreign key. M's participation is total (double line), so every M has a P1 value.
- N: a weak entity needs its own table with the key of P, because N1 is only a partial key. The identifying relationship R2 (many N to one P) is covered by this key, so R2 needs no separate table.
- P: its own table.
The tables are:
M(M1, M2, M3, P1): M1 is the primary key, P1 is a foreign key to P
P(P1, P2): P1 is the primary key
N(P1, N1, N2): (P1, N1) is the primary key, P1 is a foreign key to P
So 3 tables are needed.
Answer: (B)
Consider the entities 'hotel room', and 'person' with a many to many relationship 'lodging' as shown below:
If we wish to store information about the rent payment to be made by person (s) occupying different hotel rooms, then this information should appear as an attribute of
If we wish to store information about the rent payment to be made by person (s) occupying different hotel rooms, then this information should appear as an attribute of
Answer: (C)
The relationship Lodging is many to many: one person can stay in many rooms and one room can hold many persons. The rent depends on the particular person and room together, for example on how many persons share the room. So it is not a property of the room alone or of the person alone.
An attribute that depends on both entities in a many-to-many relationship belongs to the relationship, so the rent is an attribute of Lodging.
Answer: (C)
An attribute that depends on both entities in a many-to-many relationship belongs to the relationship, so the rent is an attribute of Lodging.
Answer: (C)
Keep practising