+ All Categories
Home > Education > Relational Algebra,Types of join

Relational Algebra,Types of join

Date post: 19-Jan-2017
Category:
Upload: raj-upadhyay
View: 125 times
Download: 2 times
Share this document with a friend
15
DATABASE MANAGEMENT SYSTEMS PRESENT BY: RUSHIT BHADANIYA
Transcript
Page 1: Relational Algebra,Types of join

DATABASE MANAGEMENT SYSTEMS

PRESENT BY:RUSHIT BHADANIYA

Page 2: Relational Algebra,Types of join

RELATIONAL ALGEBRA Introduction Join Operation

Page 3: Relational Algebra,Types of join

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.

Page 4: Relational Algebra,Types of join

FUNDAMENTAL OPERATION IN RELATIONAL ALGEBRA ARE: Selection Projection Union Set Difference Cartesian Product Join

Page 5: Relational Algebra,Types of 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

Page 6: Relational Algebra,Types of join

TYPES OF JOIN Theta Join Equi Join Natural Join Outer Join

Page 7: Relational Algebra,Types of 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

Page 8: Relational Algebra,Types of join

THETA JOIN This is same as EQUI JOIN but it allows all

other operators like >, <, >= etc.

Page 9: Relational Algebra,Types of join

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.

Page 10: Relational Algebra,Types of join

EXAMPLE

Page 11: Relational Algebra,Types of join

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.

Page 12: Relational Algebra,Types of join
Page 13: Relational Algebra,Types of join
Page 14: Relational Algebra,Types of join
Page 15: Relational Algebra,Types of join

THANK YOU


Recommended