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

Zhaf picture Zhaf · Jan 5, 2011 · Viewed 184.6k times · Source

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

Answer

Devendra D. Chavan picture Devendra D. Chavan · Jan 5, 2011

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

For example, if one department can employ for 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