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 ProductConceptA join combines tuples from two relations under a matching condition. A natural join uses equality on every same-named attribute and returns one copy…

  1. A.

    Cartesian Product always

  2. B.

    Combination of Union and filtered Cartesian Product

  3. C.

    Combination of Selection and filtered Cartesian Product

  4. D.

    Combination of Projection and filtered Cartesian Product

Attempted by 819 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

  1. Cartesian product: form R × S, which contains every tuple pair and both relations’ attribute copies.

  2. Filter: retain only pairs whose values agree on every shared attribute name. This intermediate relation is the filtered Cartesian product.

  3. 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.

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…