Skip to content
Related Articles

Related Articles

Difference between Selection and Projection in DBMS

View Discussion
Improve Article
Save Article
  • Last Updated : 12 Jun, 2020
View Discussion
Improve Article
Save Article

Prerequisite – Relational Algebra
1. Selection :
This operation chooses the subset of tuples from the relation that satisfies the given condition mentioned in the syntax of selection.

Notation –

σc (R)

Here, ‘c’ is selection condition and ‘σ (sigma)’ is used to denote Select Operator.

2. Projection :
This operation selects certain required attributes, while discarding other attributes.

Notation –

πA (R)

where ‘A’ is the attribute list, it is the desired set of attributes from the attributes of relation(R),
symbol ‘π(pi)’  is used to denote the Project operator,
R is generally a relational algebra expression, which results in a relation.



Difference between Selection and Projection in DBMS

S. No.CategorySelectionProjection
1.Other NamesThe selection operation is also known as horizontal partitioning.The Project operation is also known as vertical partitioning.
2.UseIt is used to choose the subset of tuples from the relation that satisfies the given condition mentioned in the syntax of selection.It is used to select certain required attributes, while discarding other attributes.
3.PartitioningIt partitions the table horizontally.It partitions the table vertically.
4.Which used firstThe selection operation is performed before projection (if they are to be used together).The projection operation is performed after selection (if they are to be used together).
5.Operator UsedSelect operator is used in Selection Operation.Project operator is used in Projection Operation.
6.Operator SymbolSelect operator is denoted by Sigma symbol.Project operator is denoted by Pi symbol.
7.CommutativeSelection is commutative.Projection is not commutative.
8.Column SelectionSelect is used to select all columns of a specific tuple.Project is used to select specific columns.
9.SQL Statements usedSELECT, FROM, WHERESELECT, FROM
My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!