Find minimum number of tables required for converting the following entity…

2019

Find minimum number of tables required for converting the following entity relationship diagram into relational database?

  1. A.

    2

  2. B.

    4

  3. C.

    3

  4. D.

    5

Attempted by 693 students.

Show answer & explanation

Correct answer: C

Minimum number of tables required: 3

Explanation:

  • Table for the first entity (R1): store attributes A and C and the primary key (e.g., R1_id).

  • Table for the second entity (R2): store attributes X and Y and the primary key (e.g., R2_id). Because the relationship is one-to-many (1 on the R1 side and M on the R2 side), include a foreign key (R1_id) in the R2 table to implement the relationship.

  • Table for the multivalued attribute B of R1: create a separate relation (e.g., R1_B) with columns (R1_id, B_value). R1_id references R1 and (R1_id, B_value) can form the primary key for this table.

  • No separate table is needed for the relationship R12 because it is a one-to-many relationship without attributes; a foreign key on the many side suffices.

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

Explore the full course: Mppsc Assistant Professor