Let 𝐸1 and 𝐸2 be two entities in E-R diagram with simple single valued…

2015

Let 𝐸1 and 𝐸2 be two entities in E-R diagram with simple single valued attributes. 𝑅1 and 𝑅2 are two relationships between 𝐸1 and 𝐸2 where 𝑅1 is one-many and 𝑅2 is many-many. 𝑅1 and 𝑅2 do not have any attribute of their own. How many minimum number of tables are required to represent this situation in the Relational Model ?

  1. A.

    4

  2. B.

    3

  3. C.

    2

  4. D.

    1

Attempted by 577 students.

Show answer & explanation

Correct answer: B

Final answer: 3 tables.

Reasoning:

  • One table for entity E1 to store its simple attributes.

  • One table for entity E2 to store its simple attributes.

  • One junction table to represent the many-to-many relationship R2; it contains foreign keys referencing E1 and E2.

About the one-to-many relationship R1:

Since R1 has no attributes, it does not require a separate table. Implement R1 by adding a foreign key in the table for the entity on the many side that references the primary key of the one side.

Therefore, the minimum number of tables required is 3.

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

Explore the full course: Mppsc Assistant Professor