Relational Algebra - Project operator (Projection)

1 - About

The project operator is a relational operator that keeps:

  • only a set of columns (in other words eliminates the others).
  • or delete attributes not in the projection list

It chooses a subset of the columns in the table.

3 - Visualisation

select vs projection.

4 - Notation

<MATH> \begin{array}{c} \LARGE \Pi_{A_1,\,A_2,\,\dots} (R) \\ \\ \LARGE \Pi_{col_1,\,col_2,\, \dots} (Table) \end{array} </MATH>

5 - Type

5.1 - Set

A set projection is equivalent to a distinct because a set does not allow duplicate.

Sql equivalent:

select distinct col1 from table

5.2 - Bag

A bag projection has no distinct because it allows duplicate.

Sql equivalent:

select col1 from table

Data Science
Data Analysis
Data Science
Linear Algebra Mathematics

Powered by ComboStrap