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 ?
View worked solution
Answer: A
To optimize the given relational algebra expression, we can apply standard heuristic optimization rules for relational algebra:
1. Selection Cascading (Combining Selections):
Consecutive selection operations can be combined into a single selection using the logical AND () operator:
This reduces the number of passes or evaluations needed for filtering rows.
2. Projection Cascading (Eliminating Redundant Projections):
For nested projection operations , if the set of attributes is a subset of (), then the intermediate projection onto is redundant because the outer projection onto will ultimately discard any extra attributes in .
Given that , we have:
Applying this to our expression where gives:
Thus, the optimized relational algebra expression is , which corresponds to Option A.
Free practice · Your answers on this page are not saved.
