Let pk(R) denotes primary key of relation R. A many-to-one relationship that…
2017
Let pk(R) denotes primary key of relation R. A many-to-one relationship that exists between two relations R1 and R2 can be expressed as follows :
- A.
pk(R2) → pk(R1)
- B.
pk(R1) → pk(R2)
- C.
pk(R2) → R1 ∩ R2
- D.
pk(R1) → R1 ∩ R2
Attempted by 1129 students.
Show answer & explanation
Correct answer: B
Answer: pk(R1) → pk(R2)
Explanation: In a many-to-one relationship from R1 to R2, each tuple in R1 is associated with exactly one tuple in R2. That means if you know the primary key of an R1 tuple, you can determine the primary key of the associated R2 tuple. This is expressed as the functional dependency pk(R1) → pk(R2).
Why the reverse pk(R2) → pk(R1) is wrong: That would say each R2 tuple determines a single R1 tuple, implying one-to-many in the opposite direction (one R2 to at most one R1), which contradicts many-to-one from R1 to R2.
Why expressions involving intersections are inappropriate: Writing pk(R2) → R1 ∩ R2 or pk(R1) → R1 ∩ R2 mixes keys with set operations and does not express a clear functional dependency between the two relations' keys.
Concrete example: If R1 = Orders and R2 = Customers, each order has a single customer, so order_id → customer_id (pk(R1) → pk(R2)).