1.

How To Implement One-to-one, One-to-many And Many-to-many Relationships While Designing Tables?

Answer»

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.

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.



Discussion

No Comment Found