Tuesday 20 February 2024

Selection Operator in Relational Algebra


Selection Operator-


·   Selection Operator (σ) is a unary operator in relational algebra that performs a selection operation.

·   It selects those rows or tuples from the relation that satisfies the selection condition.

·   It is a fundamentals / Basic operator

·   It is a Unary Operator




·   Select tuples from a relation “Books” where subject is “database”

σsubject = “database” (Books)

·   Select tuples from a relation “Books” where subject is “database” and price is “450”

σsubject = “database”  price = “450” (Books)

·   Select tuples from a relation “Books” where subject is “database” and price is “450” or have a publication year after 2010

σsubject = “database”  price = “450”  year >”2010″ (Books)

Important Points-




·   We may use logical operators like  , ! and relational operators like  = , ≠ , > , < , <= , >= with the selection condition.



·   Selection operator only selects the required tuples according to the selection condition.

·   It does not display the selected tuples.

·   To display the selected tuples, projection operator is used.



·   Selection operator always selects the entire tuple. It can not select a section or part of a tuple.



·   Selection operator is commutative in nature i.e.

σ A B (R) = σ  A (R)


σ (σ A(R)) = σ (σ B(R))




·   Degree of the relation from a selection operation is same as degree of the input relation.


 ·        The number of rows returned by a selection operation is obviously less than or equal to the number of rows in the original table.

·        Minimum Cardinality = 0

·        Maximum Cardinality = |R|



No comments:

Post a Comment