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

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

Implementations of relationship is there : 

> One-to-One relationship : Its relationship basically use for only single table implementation and rarely for two tables with primary and foreign key relationships.
> One-to-Many relationships :Its relationship is basically use for the implemented by splitting the data into two tables with primary key and foreign key relationships.

> Many-to-Many relationships : Its relationship is basically use for implemented using a junction table with the keys from both the tables forming the composite primary key of the junction table.

By:UMANG
Date:2012-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related SQL Subjective Links

SQL Subjective interview questions and answers for experienced and fresher