Computer Science, asked by paudelkrishna723, 11 months ago

what is relational algebra in simulation

Answers

Answered by divakar17
1

In relational algebra, a selection (sometimes called a restriction in reference to E.F. Codd's 1970 paper and not, contrary to a popular belief, to avoid confusion with SQL's use of SELECT, since Codd's article predates the existence of SQL) is a unary operation that denotes a subset of a relation.

A selection is written as {\displaystyle \sigma _{a\theta b}(R)} or {\displaystyle \sigma _{a\theta v}(R)} where:

a and b are attribute names

θ is a binary operation in the set {\displaystyle \{\;<,\leq ,=,\neq ,\geq ,\;>\}}

v is a value constant

R is a relation

The selection {\displaystyle \sigma _{a\theta b}(R)} denotes all tuples in R for which θ holds between the a and the b attribute.

The selection {\displaystyle \sigma _{a\theta v}(R)} denotes all tuples in R for which θ holds between the a attribute and the value v.

For an example, consider the following tables where the first table gives the relation Person, the second table gives the result of {\displaystyle \sigma _{{\text{Age}}\geq 34}({\text{Person}})} and the third table gives the result of {\displaystyle \sigma _{{\text{Age}}={\text{Weight}}}({\text{Person}})} .

Similar questions