Let and be two entities in an diagram with simple-valued attributes. and are two relationships between and , where is one-to-many and is many-to-many. and do not have any attributes of their own. What is the minimum number of tables required to represent this situation in the relational model?
GATE CSE 2005Databases › ER Modeling & Relational Model FundamentalsVerified
GATE CSE 2005 PYQ: Let E 1 E_1 E 1 and E 2 E_2 E 2 be two entities in an E / R E/R E / R diagram with simple-valued…
- A2
- B3Correct answer
- C4
- D5
Answer
(B) 3 3 3
Approach
Count the minimum number of relation schemas needed. Each entity needs its own table. A one-to-many relationship is not given a separate table; it is absorbed into the table of the entity on the "many" side as a foreign key (plus any relationship attributes). A many-to-many relationship cannot be absorbed into either entity table, so it requires its own separate table whose primary key is the combination of both participating entity keys.
Minimum tables = 1 (for $E_1$) + 1 (for $E_2$, embedding one-to-many $R_1$ as a foreign key) + 1 (separate table for many-to-many $R_2$) = 3, i.e. option B.
Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.