CS FundamentalsModerateTCS NQT · Infosys pattern

In an ER diagram, entity sets Student and Course are related by a many-to-many relationship Enrols that has an attribute grade. What is the minimum number of tables needed?

  1. A. 3
  2. B. 1
  3. C. 2
  4. D. 4

Correct answer: A. 3

M:N needs its own table holding both keys and grade, plus one table for each entity: 3. Only 1:N or 1:1 relationships can be folded into an entity's table.

More DBMS and SQL questions

Exams that ask this topic