一对多和多对一关系的区别 [英] Difference between one-to-many and many-to-one relationship
问题描述
一对多和多对一关系的真正区别是什么?它只是颠倒了,怎么样?
除此之外,我找不到关于此主题的任何好且易于理解"的教程:SQL 初学者:第 3 部分 - 数据库关系
是的,反之亦然.这取决于实体存在于关系的哪一侧.
例如,如果一个部门可以雇佣多个员工,那么部门与员工是一对多的关系(1 个部门雇用多个员工),而员工与部门的关系是多对一的(多个员工在一个部门工作).>
有关关系类型的更多信息:
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
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
这篇关于一对多和多对一关系的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!