# Join Operation

Join Operation is the important topic of the Database Management System. Moreover, Freestudy9 has all kind of important topic and information about the subject.

*Natural Join Operation(**) *

**Operation: **Natural join will retrieve information from multiple relations. It works in three steps.

- It performs Cartesian product
- Similarly, Then it finds consistent tuples and inconsistent tuples are deleted
- Then it deletes duplicate attributes

*The Outer Join Operation()*

An outer join does not require each record in the two joined tables to have a matching record.

Also, In the natural join, some records are missing if we want that missing records than we have to use the outer join.

**Types of ***Outer Join*

*Outer Join*

- Left
*Outer Join* - Right
*Outer Join* - Full
*Outer Join*

**Left outer join**

- The left outer join retains all the tuples of the left relation even though there is no matching tuple in the right relation.
- Moreover, For such kind of tuples having no matching, the attributes of right relation will be padded with null in resultant relation.

**Right outer join*** *

- The right outer Join Operation returns all the tuples of the right relation even though there is no matching tuple in the left relation.
- Also, For such kind of tuples having no matching, the attributes of left relation will be padded with null in resultant relation.

**Full outer join **

- The full outer Join Operation returns all the tuples of both of the relations. It also pads null values whenever required.

#### Union

**Operation:**Selects tuples those are in either or both of the relations.**Symbol:**U(Union)**Notation :**Relation1 U Relation2**Requirement:**Union must take compatible relations.- Relations R and S are compatible, if
- Moreover, Both have same arity, i.e. total numbers of attributes, and
- Domains of the i
^{th}attribute of R and S are the same type.

#### Intersection

**Operation:**Selects tuples those are in both relations.**Symbol: ∩**(Intersection)**Notation :**Relation1 ∩ Relation2**Requirement:**Set-intersection must take between compatible relations.- Also, Relations R and S are compatible, if
- Both have same arity, i.e. total numbers of attributes, and
- Domains of i
^{th}attributes of R and S are the same type.

**Related Terms**

DBMS Short Note, Relational Algebraic Operation, DBMS Key, Engineering Study.

## Leave a Reply