HOW TO IMPLEMENT ONE-TO-ONE, ONE-TO-MANY AND MANY-TO-MANY RELATIONSHIPS WHILE DESIGNING TABLES?

Amit Singh

Total Post:562

Points:2810
Posted by  Amit Singh
 1507  View(s)
Ratings:
Rate this:
  1. Amit Singh

    Post:562

    Points:2810
    How to implement one-to-one, one-to-many and many-to-many relationships while designing tables?

    One-to-One relationship can be implemented as a single table and rarely as two tables with primary and foreign key relationships.
    One-to-Many relationships are implemented by splitting the data into two tables with primary key and foreign key relationships.
    Many-to-Many relationships are implemented using a junction table with the keys from both the tables forming the composite primary key of the junction table.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!