In relational algebra, the join operator (⨝) can logically be replaced with…
In relational algebra, the join operator (⨝) can logically be replaced with which operator/s?
Answer: B. cross product (x), select (σ) and project (π). — Key idea: a join can be expressed by taking the Cartesian product, selecting tuples that satisfy the join condition, and projecting the required attributes.…
- A.
intersection (∩) and set-difference (-).
- B.
cross product (x), select (σ) and project (π).
- C.
set-difference (-), union (U) and intersection (∩).
- D.
cross product (x),set-difference (-) and union (U).
Attempted by 333 students.
Show answer & explanation
Correct answer: B
Key idea: a join can be expressed by taking the Cartesian product, selecting tuples that satisfy the join condition, and projecting the required attributes.
Step 1: Compute the Cartesian product A × B.
Step 2: Apply selection σ to keep only tuples that satisfy the join condition (for equijoin, equality of matching attributes).
Step 3: Apply projection π to produce the final set of attributes for the joined relation.
General formula: π attributes (σ join-condition (A × B))
Example: For relations A(a, x, y) and B(a, p, q): (A ⨝ B) = π a, p, q, x, y (σ A.a = B.a (A × B)).