Below is a clear, complete, and exam-friendly explanation of Connectivity and Cardinality in the ER Model.
These concepts describe how entities participate in relationships.
⭐ CONNECTIVITY & CARDINALITY IN ER MODEL
Connectivity and cardinality describe how many instances of one entity can be associated with how many instances of another entity in a relationship.
They are essential for understanding relationship types and designing correct foreign keys in relational databases.
⭐ 1. CONNECTIVITY
Connectivity refers to the type of relationship that exists between two entities based on the number of associated instances.
It defines the mapping type between entity sets.
The main types of connectivity are:
1. One-to-One (1:1) Connectivity
Each entity in A is related to only one entity in B, and vice versa.
Examples:
- Each citizen has one passport.
- Each employee has one locker.
Notation:
A (1) —— (1) B
2. One-to-Many (1:M or 1:N) Connectivity
One entity in A relates to many entities in B.
But each entity in B relates to only one entity in A.
Examples:
- A department has many employees.
- A teacher teaches many students.
Notation:
A (1) ——< (M) B
3. Many-to-One (M:1) Connectivity
Reverse of one-to-many.
Examples:
- Many students belong to one department.
- Many employees work under one manager.
Notation:
A (M) >—— (1) B
4. Many-to-Many (M:N) Connectivity
Entities in A can relate to multiple entities in B, and vice versa.
Examples:
- Students enroll in many courses.
- Courses have many students.
Notation:
A (M) ——< >—— (N) B
➡ In relational databases, M:N must be resolved using an associative entity (bridge table).
⭐ 2. CARDINALITY
Cardinality specifies the minimum and maximum number of times an entity can participate in a relationship.
It is written as:
(min, max)
Minimum Cardinality
Defines whether participation is:
- 0 → Optional
- 1 → Mandatory
Maximum Cardinality
Defines whether:
- 1 → At most one
- N → Many
Common Cardinality Notations
1. (1,1) – Mandatory and Single
Entity must participate exactly once.
Example:
- Passport must belong to one citizen.
2. (0,1) – Optional and Single
Entity may or may not participate.
Example:
- Employee may have a company vehicle.
3. (1,N) – Mandatory and Many
Must participate in at least one relationship.
Example:
- Every student must enroll in at least one course.
4. (0,N) – Optional and Many
May participate in multiple relationships, but not required.
Example:
- A customer may place many orders (or none).
⭐ DIFFERENCE BETWEEN CONNECTIVITY & CARDINALITY
| Feature | Connectivity | Cardinality |
|---|---|---|
| Meaning | Type of relationship | Number of instances allowed |
| Types | 1:1, 1:M, M:N | (min, max) like (0,1), (1,N) |
| Purpose | Defines relationship category | Defines participation constraints |
| Example | Teacher–Student is 1:M | Teacher (1,N), Student (1,1) |
⭐ EXAMPLE WITH BOTH CONNECTIVITY & CARDINALITY
Relationship: Department employs Employees.
Connectivity: 1:M
One department employs many employees.
Cardinality:
- Department: (1,N) → Must have at least one employee
- Employee: (1,1) → Belongs to exactly one department
Diagrammatically:
Department (1,N) —— employs —— (1,1) Employee
⭐ Perfect 5-Mark Summary
Connectivity describes the type of relationship, such as 1:1, 1:M, M:1, and M:N.
Cardinality specifies the minimum and maximum participation of entities, such as (0,1), (1,1), (0,N), (1,N).
Together, they define how many entity instances can be linked through a relationship and help in designing correct foreign keys in relational databases.
