Skip to content
Official PYQ · 2001

GATE CS 2001 Q1.25 — Relational Model: Relational Algebra

Explain with AI

Let r and s be two relations over the relation schemes R and S respectively, and let A be an attribute in R.  The relational algebra expression σA=a(r⋈s)\sigma_{A=a}(r \bowtie s) is always equal to

Choose one option
View worked solution

Answer: C

The given relational algebra expression is:

σA=a(r⋈s)\sigma_{A=a}(r \bowtie s)

We are given that AA is an attribute in the schema RR of relation rr.

According to the heuristic query optimization rules in relational algebra, a selection operation σC\sigma_{C} can be pushed down through a join ⋈\bowtie if the selection condition CC involves only the attributes of one of the relations.

Since the selection condition A=aA = a only references the attribute AA, which belongs to the schema RR of relation rr, we can apply the selection directly to rr before performing the join:

σA=a(r⋈s)≡σA=a(r)⋈s\sigma_{A=a}(r \bowtie s) \equiv \sigma_{A=a}(r) \bowtie s

This optimization reduces the size of the relation rr before the join operation, making the query evaluation more efficient while producing the exact same result.

Thus, the expression is always equal to σA=a(r)⋈s\sigma_{A=a}(r) \bowtie s.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Relational Model: Relational Algebra questions