Alex Rivera | Logout

Difference between one-to-many and many-to-one relationship

Asked 2011-01-05T07:23:07.497
171

What is the real difference between one-to-many and many-to-one relationship? It is only reversed, kind of?

I can't find any 'good-and-easy-to-understand' tutorial about this topic other than this one: SQL for Beginners: Part 3 - Database Relationships

Edit
Report

2 Answers

149

Yes, it is vice versa. It depends on which side of the relationship the entity is present on.

For example, if one department can employ several employees then department to employee is a one-to-many relationship (1 department employs many employees), while employee to department relationship is many-to-one (many employees work in one department).

More info on the relationship types:

Database Relationships - IBM DB2 documentation

answered 2011-01-05T07:30:26.237
6

There is no difference. It's just a matter of language and preference as to which way round you state the relationship.

answered 2011-01-05T11:37:22.440

Your Answer