Let E₁ and E₂ be two entities in an E/R diagram with simple single-valued…

2005

Let E₁ and E₂ be two entities in an E/R diagram with simple single-valued attributes.
R₁ and R₂ are two relationships between E₁ and E₂, where R₁ is one-to-many and R₂ is many-to-many.
R₁ and R₂ do not have any attributes of their own.
What is the minimum number of tables required to represent this situation in the relational model?

  1. A.

    2

  2. B.

    3

  3. C.

    4

  4. D.

    5

Attempted by 405 students.

Show answer & explanation

Correct answer: B

To represent the E/R diagram in the relational model:

1. Each entity with simple attributes is represented by a table. So E₁ and E₂ each become one table.

2. A one-to-many relationship (R₁) is represented by adding a foreign key to the table on the 'many' side. No separate table is needed.

3. A many-to-many relationship (R₂) requires a separate junction table to store the pairs of primary keys from E₁ and E₂.

4. Total tables: 2 (for E₁ and E₂) + 1 (for R₂) = 3.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir