CS FundamentalsVery hardGATE CS (PYQ pattern)

An ER model has entity sets E1, E2, E3 and a weak entity W (identified through E3 by an identifying 1:N relationship). Relationships: E1–E2 many-to-many (with an attribute), E2–E3 one-to-many (E3 is the many side, total participation), E1–E3 many-to-many. Using the standard mapping with the fewest relations, how many relations (tables) result?

  1. A. 5
  2. B. 6
  3. C. 7
  4. D. 8

Correct answer: B. 6

E1, E2, E3 and W each give one table (4); the identifying relationship is folded into W; the 1:N E2–E3 relationship is folded into E3 (foreign key); the two many-to-many relationships need their own tables (2). Total 4 + 2 = 6.

More DBMS and SQL questions

Exams that ask this topic