What is many-to-many relationship in DBMS, many-to-many relationship example, cardinality ratio many-to-many
When we would say the relationship is one-to-many?
Assume two entity sets A and B. The relationship between A and B is many-to-many if and only if “an entity in A is associated with zero or more entities (records) in B and an entity in B is associated with zero or more entities (records) in A”.
If we put in simpler terms, entity set B is the many side for A and entity set A is the many side for B.
|Sample many-to-many relationship between entity sets|
- Each student registered for zero or more courses [for example, Ravi registered for DBMS and Operating System]
- Each course is registered by zero or more students [ for example, DBMS is registered by Ravi, Mark, and Mary]
|Many-to-many relationship Register between entity sets Student and Course|
Go to Some facts about relational tables page