Consider the following ER diagram. The minimum number of tables needed to…
2008
Consider the following ER diagram. 
The minimum number of tables needed to represent M, N, P, R1, R2 is
- A.
2
- B.
3
- C.
4
- D.
5
Attempted by 549 students.
Show answer & explanation
Correct answer: B
Final answer: 3 tables.
Explanation:
Entity identification: M and P are regular (strong) entities; N is a weak entity (double-bordered rectangle).
Create one table for each strong entity: one table for M and one table for P.
Map the weak entity N to a table that contains N's attributes (its partial key) plus a foreign key referencing the owner P's primary key; do not create a separate table for the identifying relationship R2.
Map relationship R1 without a new table because it is not a many-to-many relationship in this diagram. Represent it by placing the primary key of the appropriate side as a foreign key on the related side.
Therefore the required tables are: M, P, and N — a total of 3 tables.
Example relational schemas (illustrative):
M(primary_key_M, M1, M2, M3, [FK_for_R1_if_needed])
P(primary_key_P, P1, P2)
N(partial_key_N, N1, N2, owner_P_primary_key_as_FK) -- weak entity table; includes FK to P; no separate R2 table