Relational Algebra =
a mathematical language
for manipulating
relations
Recall that:
Relation = a
subset of
a cartesian product
(So a relation is a
set !!!!)
Relational Algebra contains
the followingoeprators:
Set operators
Relational database specific operators
set functions
Overview of the
operators in
Relational Algebra:
The input(s) and
result (output) of
relational algebra operators
Very important facts:
The input(s) of
a Relational Algebraoperator is/are:
one or more relations
(A relation = a
set of
tuples (table))
The result (= output)
of a Relational Algebraoperation
is always:
a relation
Graphically:
This property is
necessary so that
we can useRelational Operators
in a cascaded (chained) manner:
It is similar to
why we
can cascade the
add (arithmetic) operations:
The add operation works on 2 numbers and outputs a number:
3 + 5 = 8 (number + number = number)
We can cascade the addition because the result of
an addition is always a number:
3 + 5 + 9 = 8 + 9 = 17
(If 3 + 5 did not result in a number, we could not continue
with the arithmetic operation !!!)