Machine-translated by Google. Questions are authored in English.
Top

Discussion

Consider the following ER diagram.

ER diagram: entity M (key M1, attributes M2 and M3) in total participation with relationship R1 to entity P (key P1, attribute P2), with an arrow to P; weak entity N (attributes N1 underlined and N2) joined to P by identifying relationship R2 with an arrow to P

Minimum number of tables needed to represent M, N, P, R1, R2 is

  • A.2
  • B.3
  • C.4
  • D.5

Answer: B

The minimum number of tables is 3.

  • R1 is many-to-one from M to P, and M takes part totally, so R1 can be merged into M's table by adding P1 as a foreign key: M(M1, M2, M3, P1).
  • P needs its own table: P(P1, P2).
  • N is a weak entity identified through R2, so the identifying relationship is merged into N's table, whose key is P1 plus the partial key N1: N(P1, N1, N2).

That is three tables. Five would give R1 and R2 tables of their own, which the cardinalities make unnecessary, and two would lose either P or the weak entity N.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.