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 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.
THANK YOU

Relational Algebra,Types of join

  • 1.
  • 2.
  • 3.
    INRODUCTION  Relational Algebrais 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 INRELATIONAL ALGEBRA ARE:  Selection  Projection  Union  Set Difference  Cartesian Product  Join
  • 5.
    JOIN  The JOINoperation 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
  • 6.
    TYPES OF JOIN Theta Join  Equi Join  Natural Join  Outer Join
  • 7.
    EQUI JOIN  Forwhatever 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  Thisis same as EQUI JOIN but it allows all other operators like >, <, >= etc.
  • 9.
    NATURAL JOIN  TheJOIN 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.
  • 10.
  • 11.
    OUTER JOIN There arethree 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.
  • 15.