Search:     Advanced search
Browse by category:
C/C++   |   Java   |   Oracle/Database   |   SAP   |   ASP .NET   |   Mainframe-DB2   |   Freshers

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

Add comment
Views: 67
Votes: 0
Comments: 0
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.
Others in this Category
document What is Index?
document What does it mean to have QUOTED_IDENTIFIER ON? What are the implications of having it OFF?
document Q: What is ON DELETE CASCADE ?
document What is Dirty Read ?
document What is CHECK Constraint?
document Which are new data types introduced in SQL SERVER 2008?
document What is UNIQUE KEY constraint?
document Q: What is a join ? Explain the different types of joins ?
document What are primary keys and foreign keys?
document Q: What are the advantages of VIEW ?
» More articles



RSS