What is relationship?



Author: Suraj
+0 -0

A relationship is a link between two or more tables that defines how data in those tables is related to each other. Relationships are used to connect tables and ensure that data is stored in a consistent and predictable way.
There are three main types of relationships in a relational database:
One-to-One (1:1) Relationship: In a 1:1 relationship, each record in one table is linked to exactly one record in the other table, and vice versa.
One-to-Many (1:N) Relationship: In a 1:N relationship, one record in one table is linked to multiple records in the other table, but each record in the second table is linked to only one record in the first table.
Many-to-Many (N: M) Relationship: In an N: M relationship, multiple records in one table are linked to multiple records in the other table, and vice versa.




Submit Your Response