# Join in RDBMS

We have discussed in the previous blog how to normalize a table in DBMS because without normalization a table is very complex to process structured data.

## What is Join?

Let's see some tables of an e-commerce company like Flipkart, amazon etc.

Suppose it has records stored in the following tables.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1684414824294/1b22a352-78c1-419d-a15a-3f450a6d3932.png align="center")

In this company, there are three tables of three different entity-Sales, Customer and Product.

A company always focuses on its sales. If this company wants a report of most purchased sales by the youth people, then a developer needs:

Youth people age's group data by--&gt; Customer Table

Sales data by --&gt; Sales Table

Hottest selling Product by--&gt; Product Table

Thus, we have to keep a deep insight into different tables.

Join is a process to find data from different tables in a specific way. Join combines two different tables and gives user-according data or company-according data.

In further blogging, we will see joins wildly in SQL.

## Types of Join

There are four categories of Join.

1. Inner Join
    
2. Left Join
    
3. Right Join
    
4. Full Join
    

Let's understand this before going deep study.

### Inner Join

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1684415991364/0db7bf3f-492f-408d-8358-7d7db1bee9e0.png align="center")

As seen in the ven diagram, Inner Join joins two left and right side tables and gives common data.

### Right Join

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1684416113254/5d04f500-5142-4454-88c4-1af4311a5944.png align="center")

Right join gives the right table's data and both the left and right table's joining data.

### Left Join

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1684416297538/e3df8b58-0107-4d7d-b9a5-0063177664ae.png align="center")

As shown in this diagram, it gives the left table's data and both tables' common data.

### Full Join

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1684416419543/92ba9610-51eb-4d8d-a991-708d3a3f9267.png align="center")

It takes everything present in both tables and also joins data(common data).

We will discuss more in further blog SQL.
