Question
What is the optimized version of the relation algebra expression , where are sets of attributes in with and are Boolean expressions based on the attributes in ?
Official answer and solution
- Official answer
- A
- From
- Official GATE 2014 answer key
Solution
Apply algebraic transformation rules for cascade of projections and cascade of selections.
Given the relational algebra expression:
where are sets of attributes with , and are selection conditions on attributes of .
-
Cascade of Selections:
Successive selection operations commute and combine via logical conjunction (AND): -
Cascade of Projections:
For any attribute sets and where :Since , performing projection onto first and then onto simply yields the projection onto directly:
-
Combining both rules:
This matches option A.
A
Choosing disjunction (OR) instead of conjunction (AND) for cascading selections.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2014 Computer Science and Information Technology (CS) Session 3
- Question
- 31 of 65, printed as CS Q.21
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.