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.
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
|1.||Other Names||The selection operation is also known as horizontal partitioning.||The Project operation is also known as vertical partitioning.|
|2.||Use||It 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.||Partitioning||It partitions the table horizontally.||It partitions the table vertically.|
|4.||Which used first||The 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 Used||Select operator is used in Selection Operation.||Project operator is used in Projection Operation.|
|6.||Operator Symbol||Select operator is denoted by Sigma symbol.||Project operator is denoted by Pi symbol.|
|7.||Commutative||Selection is commutative.||Projection is not commutative.|
|8.||Column Selection||Select is used to select all columns of a specific tuple.||Project is used to select specific columns.|
|9.||SQL Statements used||SELECT, FROM, WHERE||SELECT, FROM|
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Difference between First Angle Projection and Third Angle Projection
- Difference between Parallel and Perspective Projection in Computer Graphics
- Difference between 1NF and 2NF in DBMS
- Difference between DDL and DML in DBMS
- Difference between 2NF and 3NF in DBMS
- Difference between Database and DBMS
- Difference between BCNF and 4NF in DBMS
- Difference between 3NF and BCNF in DBMS
- Difference between RDBMS and DBMS
- Difference between Classification and Clustering in DBMS
- Difference between File System and DBMS
- Difference between Schema and Instance in DBMS
- Difference between Generalization and Specialization in DBMS
- Difference between Cursor and Trigger in DBMS
- Difference between Trigger and Procedure in DBMS
- Difference between OLAP and OLTP in DBMS
- Difference between Assertions and Triggers in DBMS
- Difference between Client /Server and Distributed DBMS
- Main difference between Timestamp protocol and Thomos write rule in DBMS
- Difference between Row oriented and Column oriented data stores in DBMS
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.