Given two union compatible relations R1(A,B) and R2(C,D). What is the result…
1998
Given two union compatible relations R1(A,B) and R2(C,D). What is the result of the operation R1⋈(A=C ∧ B=D) R2
- A.
R1 ∪ R2
- B.
R1 Χ R2
- C.
R1 - R2
- D.
R1 ∩ R2
Attempted by 61 students.
Show answer & explanation
Correct answer: D
The operation given is a Theta Join (⋈θ), where the join condition is A = C and B = D.
Understand Union Compatibility: Because R1(A,B) and R2(C,D) are union-compatible, they have the exact same number of attributes, and the domains of their corresponding attributes are identical (i.e., domain(A) = domain(C) and domain(B) = domain(D)).
The Join Condition: The join condition forces a row from R1 to match with a row from R2 only if the values in both columns are identical (A=C and B=D).
The Resulting Schema: Technically, a Theta Join produces a schema containing all attributes from both relations: (A, B, C, D). However, because the condition enforces strict equality across all corresponding attributes, every tuple in the result will effectively look like (a, b, a, b).
Equivalence to Intersection: In relational algebra, finding the tuples where all corresponding attribute values match identically across two union-compatible relations is the exact definition of the Set Intersection (∩) operation. While a pure intersection outputs the schema (A,B), logically, the operation filters for rows that exist identically in both sets.