Introduction
Whenever we are storing data in data in a structured format, we will not store all the data in one single
Instead what we do is we store data in multiple tables and then try to establish a relation between
By doing this we increase the efficiency of the database by reducing the time taken to sort and fetch out the required data
How to establish the relationship
- We will be establishing the relationship using the help of primary and foreign keys
Types Of Relationship
There are 4 types of relationship
One-to-one relationships
One - to -Many relationships
Many- to- Many relationship
Many-to-one relationship
Why do study the relationship
The reason to do that is in the end we will always try to combine the data stored in the multiple tables and then return a single value of that table based on our requirements
Knowing the relationship will enable us to perform this joining in a more easy way