javascript
Brief description  about Online courses   join in Online courses
View Diwakar  reddy 's Profile

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

Hello sir,
How to implement one-to-one, one-to-many and many-to-many relationships while designing tables?
Asked by Diwakar reddy | Sep 3, 2010 |  Reply now
Replies (1)
View teacher sql 's Profile
You can do it by several ways but the standard in the relational database model is like this
1)One-to-One:it can be implemented in a single table and or sometimes can be possible in two tables with primary and foreign key.
2)One-to-Many:it can be implemented by splitting the data into two tables with primary key and foreign key.
Many-to-Many:it can be implemented using a combination of tables with the keys from both the tables forming the composite primary key of the combined table.
Feb 1, 2011