In relational algebra, a projection is a unary operation written as Π a 1 , . . . , a n ( R ) {\displaystyle \Pi _{a_{1},...,a_{n}}(R)} , where R {\displaystyle R} is a relation and a 1 , . . . , a n {\displaystyle a_{1},...,a_{n}} are attribute names. Its result is defined as the set obtained when the components of the tuples in R {\displaystyle R} are restricted to the set { a 1 , . . . , a n } {\displaystyle \{a_{1},...,a_{n}\}} – it discards (or excludes) the other attributes.
In practical terms, if a relation is thought of as a table, then projection can be thought of as picking a subset of its columns. For example, if the attributes are (name, age), then projection of the relation {(Alice, 5), (Bob, 8)} onto attribute list (age) yields {5,8} – we have discarded the names, and only know what ages are present.
Projections may also modify attribute values. For example, if R {\displaystyle R} has attributes a {\displaystyle a} , b {\displaystyle b} , c {\displaystyle c} , where the values of b {\displaystyle b} are numbers, then Π a , b × 0.5 , c ( R ) {\displaystyle \Pi _{a,\ b\times 0.5,\ c}(R)} is like R {\displaystyle R} , but with all b {\displaystyle b} -values halved.