2. Mapping Cardinalities / Cardinality Ratio
Cardinality defines the number of entities in one entity set, which can be associated
with the number of entities of other set via relationship set.
Cardinality specifies the maximum number of relationships.
For binary relationship set R on an entity set A and B, there are four possible
mapping cardinalities. These are as follows:
One-to-one (1:1)
One-to-many (1:N)
Many-to-one (N:1)
Many-to-many (M:N)
3. One-to-one
One entity from entity set A can be associated with at most one entity of entity set B
and vice versa.
a1
a2
a3
a4
b1
b2
b3
b4
A B
a1
a2
a3
a4
b1
b2
b3
b4
A B
4. One-to-one Examples
One citizen has one Aadhar number, and the Aadhar number can only be used by one
citizen.
Indian
citizen
Has Aadhaar
number
1 1
One student has only one student ID, and each student ID is assigned to only one student.
Student Has Student ID
5. One-to-many
One entity from entity set A can be associated with more than one entity of entity set B,
however an entity from entity set B can be associated with at most one entity from
entity set A.
a1
a2
a3
a4
b1
b2
b3
b4
A B
6. One-to-many Example
Each customer may have more than one telephone number. but each telephone
number will be associated to only one customer.
Customer Has
Telephone
Number
1 N
Customer Has
Telephone
Number
7. Many-to-one
More than one entities from entity set A can be associated with at most one entity of
entity set B, however an entity from entity set B can be associated with more than one
entity from entity set A.
a1
a2
a3
a4
b1
b2
b3
b4
A B
8. Many-to-one Example
N 1
Student Enrolled in Course
A student can take only one course, but one course can be taken by many students.
So, the cardinality will be N to 1. It means that for one course there can be N
students but for one student, there will be only one course.
Employee Works in Department
9. Many-to-many
One entity from A can be associated with more than one entity from B and vice versa.
a1
a2
a3
a4
b1
b2
b3
b4
A B
10. Many-to-many Examples
Each customer may place an order for many products, and each product might be
ordered by many customers.
Customer
Places
Order Product
M N
Employee
Works
On Project
An employee may work on multiple projects, and a project may have
multiple employees working on it.
12. If you have a question, you can reach me via e-mail at omega.teched@gmail.com
Social Media Handles:
omega.teched
megha_with
megha-sharma24
OMega TechEd