3. INRODUCTION
Relational Algebra is a procedural query
language.
It consists of a set of operations that take one
or two relations as input and produce a new
relation as their result.
4. FUNDAMENTAL OPERATION IN RELATIONAL
ALGEBRA ARE:
Selection
Projection
Union
Set Difference
Cartesian Product
Join
5. JOIN
The JOIN operation is denoted by the R|X|S symbol
and is used to compound similar tuples from two
Relations into single longer tuples.
Join operation is generally the cross product of two
relation.
The notation used is
R JOIN S
join condition
7. EQUI JOIN
For whatever JOIN type (INNER, OUTER, etc), if
we use ONLY the equality operator (=), then we say
that the JOIN is an EQUI JOIN
8. THETA JOIN
This is same as EQUI JOIN but it allows all other
operators like >, <, >= etc.
9. NATURAL JOIN
The JOIN involves an equality test, and thus is
often described as an equi-join.
Such joins result in two attributes in the resulting
relation having exactly the same value.
A natural join will remove the duplicate attributes.
11. OUTER JOIN
There are three forms of the outer join, depending on
which data is to be kept.
LEFT OUTER JOIN - keep data from the left-hand
table and if there are no columns matching in the
right table, it returns NULL values.
RIGHT OUTER JOIN - keep data from the right-
hand table and If there are no columns matching in
the left table, it returns NULL values.
FULL OUTER JOIN - keep data from both tables
and it returns row from either table when the
conditions are met and returns NULL value when
there is no match.