Relational Algebra,Types of join
-
Upload
raj-upadhyay -
Category
Education
-
view
132 -
download
2
Transcript of Relational Algebra,Types of join
DATABASE MANAGEMENT SYSTEMS
PRESENT BY:RUSHIT BHADANIYA
RELATIONAL ALGEBRA Introduction Join Operation
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.
FUNDAMENTAL OPERATION IN RELATIONAL ALGEBRA ARE: Selection Projection Union Set Difference Cartesian Product Join
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 join condition S
TYPES OF JOIN Theta Join Equi Join Natural Join Outer Join
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
THETA JOIN This is same as EQUI JOIN but it allows all
other operators like >, <, >= etc.
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.
EXAMPLE
OUTER JOINThere 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.
THANK YOU