Question:

Which of the following relational algebra operations is equivalent to a Cartesian product followed by a selection (sigma)?

Show Hint

Think of a Natural Join as a specialized version of an Equi-join (a Theta Join where the condition is equality), but with the added convenience of removing duplicate columns.
Updated On: Jul 4, 2026
  • Natural Join
  • Theta Join
  • Outer Join
  • Intersection
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Concept:
Relational Algebra consists of basic operators like Selection ($\sigma$), Projection ($\pi$), and Cartesian Product ($\times$). From these basic operators, more complex "derived" operators are created to simplify queries.

Step 1:
Understanding Cartesian Product ($R \times S$).
A Cartesian Product takes two relations $R$ and $S$ and returns a new relation containing every possible combination of tuples from $R$ and $S$. If $R$ has $n$ rows and $S$ has $m$ rows, the product has $n \times m$ rows. This is usually very large and contains many nonsensical combinations.

Step 2:
Applying Selection ($\sigma_{\theta}$).
To make the Cartesian product useful, we apply a selection condition ($\theta$). This filters the $n \times m$ rows and keeps only those where the condition $\theta$ is true (e.g., $R.ID = S.ID$). \[ \text{Operation} = \sigma_{\theta}(R \times S) \]

Step 3:
Defining the Theta Join.
By definition, a Theta Join ($R \bowtie_{\theta} S$) is specifically defined as a shorthand for $\sigma_{\theta}(R \times S)$.
• Unlike a Natural Join, which automatically joins on columns with the same name and removes duplicate columns, a Theta Join allows any comparison operator ($=, <, >, \neq$) and keeps all columns.
Was this answer helpful?
0
0