A many-to-one relationship exists between entity sets r1 and r2 . How will it…

2018

A many-to-one relationship exists between entity sets r1 and r2 . How will it be represented using functional depedencies if Pk(r) denotes the primary key attribute of relation r ?

  1. A.

    Pk(r1 ) → Pk(r2 )

  2. B.

    Pk(r2 ) → Pk(r1 )

  3. C.

    Pk(r2 ) → Pk(r1 ) and Pk(r1 ) → Pk(r2 )

  4. D.

    Pk(r2 ) → Pk(r1 ) or Pk(r1 ) → Pk(r2 )

Attempted by 437 students.

Show answer & explanation

Correct answer: A

Answer: Pk(r1) → Pk(r2)

Why this is true:

  • Definition: A many-to-one relationship from r1 to r2 means each tuple in r1 is associated with exactly one tuple in r2, while a tuple in r2 may be associated with many tuples in r1.

  • Relational representation: The relation on the many side (r1) stores a foreign key that references the primary key of the one side (r2).

  • Functional dependency: Because each r1 tuple refers to a single r2 tuple, the primary key of r1 uniquely determines the primary key of r2, giving the functional dependency Pk(r1) → Pk(r2).

  • Contrast: Pk(r2) → Pk(r1) would mean each r2 tuple determines a single r1 tuple (the opposite direction), and having both directions would imply a one-to-one relationship.

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

Explore the full course: Mppsc Assistant Professor