GATE IT 2004 · SQL Queries

MCQ · 1 mark · Problem DBMS-SQL-0142

Consider the following entity relationship diagram (ERD), where two entities E1 and E2 have a relation R of cardinality 1:m.The attributes of E1 are A11, A12 and A13 where A11 is the key attribute. The attributes of E2 are A21, A22 and A23 where A21 is the key attribute and A23 is a multi-valued attribute. Relation R does not have any attribute. A relational database containing minimum number of tables with each table satisfying the requirements of the third normal form (3NF) is designed from the above ERD. The number of tables in the database is
  1. A
    2
  2. B
    3
  3. C
    5
  4. D
    4

Solve it on GATE DA practice →More Relational Model & SQL problems

Show the worked solution\[\boxed{\text{1:M}\to\text{foreign key};\quad\text{multivalued attribute}\to\text{own table}}\]E1\((A_{11},A_{12},A_{13})\).E2\((A_{21},A_{22},A_{11})\): R is 1:m, so the key of E1 is stored in E2 as a foreign key.E2\_A23\((A_{21},A_{23})\): the multivalued attribute needs its own table to stay in 1NF.Total: 3 tables, each in 3NF.Answer: B

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com