Q:

What's the difference between a "one-to-many" relationship and a "one-to-one" relationship?

1
Like
Answer
Comment
Flag
Thanks for your feedback!
A:

1 Answer

rank
1
2
Like
Comment
Flag
A one-to-many relationship should be established if only one of the related fields is a primary key or a unique index of some kind. For example, you would want to establish a one-to-many relationship between the Customer ID field in the Customer table (a primary key) and the Customer ID field in the Order table because there will only be one Customer ID in the Customer table that matches many Customer ID's in the Orders table. (Each time a customer makes an order, their Customer ID is used.) A one-to-one relationship should be established if both of the related fields is a primary key or a unique index of some kind. For example, if you held shipping information in one table (Customer table) and credit card information in another table (Credit table) and you allowed only one credit card to be used per customer, you would want to establish a one-to-one relationship between the Customer ID in the Customer table and the Customer ID in the Credit table. A "many-to-many" relationship is ...  more

Related Videos

Add your answer...

Top Answerers

1.
puja bhatia
14 Answers in the past week
2.
barbara mory
8 Answers in the past week
3.
tunnel raj
11 Answers in the past week

Top Askers

1.
Gurjeet Singh
1 Question in the past week
2.
Charene Whorton
1 Question in the past week
3.
Andrew Hall
1 Question in the past week

Top Supporters

1.
christina monte
4 Likes given in the past week
2.
roland evan
4 Likes given in the past week
3.
Roger Taylor
1 Like given in the past week
...