Which relational algebra operation is used to retrieve rows that satisfy a given predicate?

Boost your GATE General Aptitude and CS Exam readiness with our dynamic quiz. Test your skills with comprehensive questions featuring hints and detailed solutions. Ace your GATE exam confidently!

Multiple Choice

Which relational algebra operation is used to retrieve rows that satisfy a given predicate?

Explanation:
Filtering rows by a condition is what the selection operation does in relational algebra. It takes a relation and a predicate (a boolean expression over the attributes) and returns the subset of tuples that satisfy the predicate. For example, if you have a relation Employees with attributes such as Age, Dept, and Salary, applying a condition like Salary > 50000 yields σ_{Salary > 50000}(Employees). The result preserves all the columns of the original relation; you’d use projection afterwards if you want to keep only certain columns. This is different from projection, which reduces columns, and from join, which combines tuples from two relations based on a condition or common attributes, and from difference, which removes tuples present in another relation. So, the operation that retrieves rows meeting a given predicate is the selection.

Filtering rows by a condition is what the selection operation does in relational algebra. It takes a relation and a predicate (a boolean expression over the attributes) and returns the subset of tuples that satisfy the predicate. For example, if you have a relation Employees with attributes such as Age, Dept, and Salary, applying a condition like Salary > 50000 yields σ_{Salary > 50000}(Employees). The result preserves all the columns of the original relation; you’d use projection afterwards if you want to keep only certain columns. This is different from projection, which reduces columns, and from join, which combines tuples from two relations based on a condition or common attributes, and from difference, which removes tuples present in another relation. So, the operation that retrieves rows meeting a given predicate is the selection.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy