**Relational Algebra Operators-**

Before you go through this article, make sure that you have gone through the previous article on **Introduction to Relational Algebra**.

The operators in relational algebra are classified as-

In this article, we will discuss about Selection Operator.

**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.

**Syntax-**

σ_{<selection_condition>}(R) |

**Examples-**

- 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-**

**Point-01:**

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

**Point-02:**

- 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.

**Point-03:**

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

**Point-04:**

- Selection operator is commutative in nature i.e.

σ _{A ∧ B} (R) = σ _{B ∧ A} (R)

**OR**

σ _{B }(σ _{A}(R)) = σ _{A }(σ _{B}(R))

**Point-05:**

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

**Point-06:**

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

Thus,

- Minimum Cardinality = 0
- Maximum Cardinality = |R|

**Next Article-** **Projection Operation in Relational Algebra**

Get more notes and other study material of **Database Management System (DBMS)**.

Watch video lectures by visiting our YouTube channel **LearnVidFun**.

Summary

Article Name

Selection Operator | Relational Algebra | DBMS

Description

Relational Algebra Operators- Selection Operator (σ) is an operator in relational algebra that performs a selection operation by selecting the rows from a relation that satisfies the selection condition.

Author

Akshay Singhal

Publisher Name

Gate Vidyalay

Publisher Logo