Assume that all attributes are of integer type and make no assumptions about…
Assume that all attributes are of integer type and make no assumptions about keys. Which of the following is a valid equality of relational algebra queries on relations R(A, B, C) and S(B, C, D)?
Answer: C. σ₍R.B = S.B and R.C = S.C₎ (R × S) = R ⋈ S — Option A is not always true because projecting A and B together preserves only existing (A, B) pairs, while π_A(R) × π_B(R) can create extra combinations.…
- A.
π₍A, B₎(R) = π₍A₎(R) × π₍B₎(R)
- B.
π₍A, D₎(R ⋈ S) = π₍A₎(R) ⋈ (π₍D₎(S))
- C.
σ₍R.B = S.B and R.C = S.C₎ (R × S) = R ⋈ S
- D.
None of the above
Attempted by 130 students.
Show answer & explanation
Correct answer: C
Option A is not always true because projecting A and B together preserves only existing (A, B) pairs, while π_A(R) × π_B(R) can create extra combinations. Option B is also not always true because π_A(R) ⋈ π_D(S) has no common attributes and becomes a Cartesian product, ignoring the matching on B and C. Option C expresses the natural join of R and S on their common attributes B and C as a selection over the Cartesian product, so it is the valid equality.