What is the optimized version of the relation algebra expression A1( A2( F1( F2(r)))), where A1, A2 are sets of attributes in r with A1 ⊂ A2 and F1, F2 are Boolean expressions based on the attributes in r?
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2014 Set 3 · Q21
Time
Select one answerSingle correct
Solution
Official answer: A) A1( (F1 ∧ F2)(r))
Relational AlgebraWe use standard relational algebra equivalence rules:
Cascade of Selections:
Applying consecutive selection conditions is equivalent to applying a single selection with the logical AND of the conditions.
Cascade of Projections: If , then:
Because is a subset of , projecting onto first and then onto preserves the exact same set of attributes as directly projecting onto .
Combining these two optimizations gives:
Thus, option (A) is the correct optimized expression.
Try the question first, then check your work.
Examiner trap
Apply the equivalence rule for cascading selection operations () and cascading projection operations () given that .
This Relational Algebra previous year question is Q21 of the GATE CSE 2014 Set 3 paper. Find more GATE CSE PYQs on Relational Algebra in Databases, or browse all GATE CSE PYQs.
Free diagnostic
Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 4 related Relational Algebra PYQs now with no account.
An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.
Relational Algebra has 4 GATE CSE PYQs across 4 papers from 2012 to 2024. This is the only 1-mark MCQ among them, and it is the only one in GATE CSE 2014 Set 3.
How GATE tests Relational AlgebraIndependent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.