Define Cardinality ratio, Define Mapping cardinalities, What are the different types of relationships, Example ER diagrams for cardinality ratio
Cardinality ratios
In ER model, a relationship is an association
among entities (records) of one or more entity sets. Cardinality ratio or mapping
cardinalities is a concept that describes binary relationship set (a
relationship that connects two entity sets) and its types. It is about the maximum number of entities
of one entity set that are associated with the maximum number of entities of
the other entity set.
For example, let us assume an entity set Department (to model information about departments) and courses entity set (to model the courses that are offered by a department). To establish a link (relationship) between these two entity sets we need to define the number of entities (records) of department that are associated with number of entities (records) of courses. As per our design requirement, if a Department can offer many courses and a course can only be offered by at most one department, then the relationship between department and courses is a one-to-many relationship from department to courses (or the cardinality ratio between department and courses is one-to-many).
See the example shown in the ERD below; [arrow head side - one side, without arrow – many side]
One-to-many relationship OFFERS from entity Department to Courses |
The following are the types of relationship
sets [cardinality ratios];
- Many-to-one relationship
- Many-to-many relationship
*************
Go to Important Keywords/Terms in DBMS page
Go to Advanced DBMS concepts page
Go to Some facts about relational tables page
Why is the relationship between student and course one-to-many? If a student can register for many courses then a course would also have many students opting for it right? Please explain.
ReplyDeleteYou are correct. But, in this example, we treated student entity as one side and course as many side. This is purely for example. I will change it. Thanks.
DeleteChanged the example.
Deleteohk thank you
Delete