How do you implement one-to-one, one-to-many and many-to-
many relationships while designing tables?
Answer Posted / swapna
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.
It will be a good idea to read up a database designing
fundamentals text book.
| Is This Answer Correct ? | 48 Yes | 2 No |
Post New Answer View All Answers
What is a unique index?
Can you explain the disadvantages/limitation of the cursor?
Explain various data region available in ssrs with their use?
When setting replication, is it possible to have a publisher as 64 bit sql server and distributor or subscribers as a 32 bit sql server?
What are a database and a data warehouse?
What is a group function explain with an example?
What are the types of joins in sql?
How to execute multiple stored procedures at one time in sql server?
Write down the syntax and an example for create, rename and delete index?
How many full-text indexes can a table have?
What are the advantages of sql stored procedure?
Describe the left outer join & right outer join. : sql server database administration
In what three ways is the return statement used in a stored procedure?
How to test subquery results with the exists operator?
How can we check the sql server version?