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:
Answer: D. Combination of Projection and filtered Cartesian Product — ConceptA join combines tuples from two relations under a matching condition. A natural join uses equality on every same-named attribute and returns one copy…
- 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 823 students.
Show answer & explanation
Correct answer: D
Concept
A join combines tuples from two relations under a matching condition. A natural join uses equality on every same-named attribute and returns one copy of each common attribute in the result schema.
Using only basic relational-algebra operators, this requires filtering the Cartesian product and then projecting the union of the attribute names: R ⋈ S = π_attrs(R)∪attrs(S)(σ_common-equality(R × S)).
Application
Cartesian product: form
R × S, which contains every tuple pair and both relations’ attribute copies.Filter: retain only pairs whose values agree on every shared attribute name. This intermediate relation is the filtered Cartesian product.
Project: select the combined attribute list and retain a single copy of each shared attribute, producing the natural-join schema.
Cross-check and contrast
A plain Cartesian product performs no equality filtering and keeps both attribute copies.
Union appends tuples from union-compatible relations; it does not construct matching tuple pairs.
Adding selection to an already filtered Cartesian product repeats the filtering role and still leaves the duplicate shared-attribute copies.
Adding projection to the filtered Cartesian product supplies the remaining schema step: retaining one copy of each common attribute.
A classroom formula such as σ(R × S) describes the equality-filtering stage, or an equijoin if both common-attribute copies remain. A natural join also applies the schema projection so that each common attribute appears once.
Result: Combination of Projection and filtered Cartesian Product.