- Generalized selection
In
relational algebra , a generalized selection is aunary operation written as where is apropositional formula that consists of atoms as allowed in the normal selection and the logical operators (and), (or) and (negation ). This selection selects all thosetuple s in for which holds.For an example, consider the following tables where the first table gives the relation and the second the result of .
Formally the semantics of the generalized selection is defined as follows:
:
The result of the selection is only defined if the
attribute names that it mentions are in theheader of the relation that it operates upon.The simulation of a generalized selection that is not a fundamental selection with the fundamental operators is defined by the following rules:
: : :
The generalized selection is expressible with other basic algebraic operations.
In
SQL , general selections are performed by usingWHERE
definitions withAND
,OR
, orNOT
operands inSELECT
,UPDATE
, andDELETE
statements.ee also
*
Selection (relational algebra)
Wikimedia Foundation. 2010.