Record Attribute Selection Operation
(Redirected from Record Attribute Selection)
Jump to navigation
Jump to search
A Record Attribute Selection Operation is a Relational Algebra Operation that ...
- AKA: Projection (Relational Algebra).
- See: Relational Algebra, Unary Operation, Set (Mathematics), Tuple.
References
2014
- (Wikipedia, 2014) ⇒ http://en.wikipedia.org/wiki/projection_(relational_algebra) Retrieved:2014-11-10.
- In relational algebra, a projection is a unary operation written as [math]\displaystyle{ \Pi_{a_1, ...,a_n}( R ) }[/math] where [math]\displaystyle{ a_1,...,a_n }[/math] is a set of attribute names. The result of such projection is defined as the set obtained when the components of the tuple [math]\displaystyle{ R }[/math] are restricted to the set [math]\displaystyle{ \{a_1,...,a_n\} }[/math] – it discards (or excludes) the other attributes.
In practical terms, it can be roughly thought of as picking a sub-set of all available 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.
In addition, projection can be used to modify an attribute's value: if relation R has attributes a, b, and c, and b is a number, then
[math]\displaystyle{ \Pi_{a,\ b * 0.5,\ c}( R ) }[/math]
will return a relation nearly the same as R, but with all values for 'b' shrunk by half. [1]
- In relational algebra, a projection is a unary operation written as [math]\displaystyle{ \Pi_{a_1, ...,a_n}( R ) }[/math] where [math]\displaystyle{ a_1,...,a_n }[/math] is a set of attribute names. The result of such projection is defined as the set obtained when the components of the tuple [math]\displaystyle{ R }[/math] are restricted to the set [math]\displaystyle{ \{a_1,...,a_n\} }[/math] – it discards (or excludes) the other attributes.
- ↑ http://www.csee.umbc.edu/~pmundur/courses/CMSC661-02/rel-alg.pdf See Problem 3.8.B on page 3