Consider the following relation schema and along with their tuple
2017
Consider the following relation schema R and S along with their tuple sets.
R(A, B) = {<a1, b1>, <a2, b1>, <a3, b1>, <a4, b1>, <a1, b2>, <a3, b2>, <a2, b3>, <a3, b3>, <a4, b3>, <a1, b4>, <a2, b4>, <a3, b4>}
S(A) = {a1, a2, a3}
What is the value of T ← R / S, where “/” represents the Relational Algebra “division” operation?
- A.
T(B) = {b1, b3}
- B.
T(B) = {b1, b2, b4}
- C.
T(B) = {b1, b4}
- D.
T(B) = {b1, b3, b4}
Attempted by 199 students.
Show answer & explanation
Correct answer: C
The correct option is C. The division operation R / S finds all distinct values of attribute B in relation R that are paired with every value of attribute A present in relation S ({a1, a2, a3}). Checking R, only b1 and b4 combine with all three values a1, a2, and a3. Thus, T(B) = {b1, b4}.