In relational algebra, the natural join of two tables can be described as:
2017
In relational algebra, the natural join of two tables can be described as:
- A.
Cartesian Product always
- B.
Combination of Union and filtered Cartesian Product
- C.
Combination of Selection and filtered Cartesian Product
- D.
Combination of Projection and filtered Cartesian Product
Attempted by 376 students.
Show answer & explanation
Correct answer: D
A natural join uses common attribute names automatically. In relational algebra it can be written as projection over a selection on the Cartesian product.
Formal idea: R ⋈ S = π(attributes of R ∪ attributes of S)(σ(common attributes equal)(R × S))
Cartesian product: start with
R × S.Filtering/selection: keep only tuple pairs where every common attribute has equal values. This is the filtered Cartesian product.
Projection: remove duplicate copies of the common attributes and keep the final joined attributes.
Correct answer: Combination of Projection and filtered Cartesian Product.
Why not selection and filtered Cartesian product? Because “filtered Cartesian product” already includes the selection/filtering idea, while natural join still needs projection.