ER Model - DBMS
Understanding how data in the real world can be represented in a structured and meaningful way is a core part of database design. The Entity-Relationship (ER) Model helps us visually map real-world objects (called entities), their characteristics (attributes), and how they relate to one another (relationships). This model acts as the blueprint for designing databases that are both logical and efficient.
What is a Data Model?
Section titled “What is a Data Model?”-
A data model is a set of tools or concepts used to describe:
- What kind of data is stored
- How data items relate to each other
- Rules that must be followed (like constraints)
-
It helps in designing and understanding a database.
Example: Think of it like a blueprint before building a house.
What is the ER Model?
Section titled “What is the ER Model?”-
The Entity-Relationship (ER) model is a way to visually represent how data is related in the real world.
-
It focuses on:
- Entities (objects like Student, Car)
- Relationships between them (like Student enrolls in Course)
-
It uses a diagram called the ER Diagram, which is like the database’s sketch or plan.
Notations Used for ER Diagram
Section titled “Notations Used for ER Diagram”
What is an Entity?
Section titled “What is an Entity?”- An entity is a real-world object you can identify uniquely.
- It can be a person, place, thing, or event.
Examples:
- A student in your class
- A car registered in your name
Types of Entities
Section titled “Types of Entities”Type | Meaning | Example |
---|---|---|
Strong | Has a unique identity (Primary Key) | Student with ID |
Weak | Cannot exist alone; needs another one | Payment needs Loan to exist |
What is an Entity Set?
Section titled “What is an Entity Set?”- A group of similar entities is called an Entity Set.
Examples:
- All students in a school → Student Entity Set
- All customers of a bank → Customer Entity Set
What are Attributes?
Section titled “What are Attributes?”- Attributes are the details or characteristics of an entity.
For a Student:
- Attributes = Student_ID, Name, Class, Phone Number, Address
Types of Attributes:
Section titled “Types of Attributes:”Type | Description | Example |
---|---|---|
Simple | Cannot be split further | Roll Number |
Composite | Can be split into parts | Name → First, Middle, Last |
Single-valued | One value only | Student_ID |
Multi-valued | More than one value | Phone Numbers |
Derived | Can be calculated | Age (from Date of Birth) |
Null | Value is missing or not applicable | Middle name (if not present) |

What is a Relationship?
Section titled “What is a Relationship?”- A relationship connects two or more entities together.
Examples:
- Student enrolls in Course
- Customer borrows Loan
Types of Relationships:
Section titled “Types of Relationships:”Type | Description | Example |
---|---|---|
Strong | Between independent entities | Student - Course |
Weak | Involves weak entity (needs strong one) | Loan - Payment |

Degree of Relationship:
Section titled “Degree of Relationship:”Degree | Meaning | Example |
---|---|---|
Unary | One entity involved | Employee manages Employee |
Binary | Two entities | Student takes Course |
Ternary | Three entities | Employee works-on Project at Branch |
What are Relationship Constraints?
Section titled “What are Relationship Constraints?”These define how many entities can participate in a relationship.
A. Mapping Cardinality (How Many?)
Section titled “A. Mapping Cardinality (How Many?)”Type | Meaning | Example |
---|---|---|
One-to-One | A to B = 1:1 | Person has one Aadhar Card |
One-to-Many | A to many B | Citizen has many Vehicles |
Many-to-One | Many A to one B | Students enrolled in one College |
Many-to-Many | Many A to many B | Students attend many Courses |
B. Participation Constraints (Is It Optional or Mandatory?)
Section titled “B. Participation Constraints (Is It Optional or Mandatory?)”Type | Description | Example |
---|---|---|
Partial | Only some entities participate | Customer may or may not take a Loan |
Total | All entities must participate | Every Loan must belong to a Customer |
Extended ER Features
Section titled “Extended ER Features”ER Features can be used to model most DB features but when complexity increases, it is better to use some Extended ER features to model the DB Schema.
Specialisation
Section titled “Specialisation”- In ER model, we may require to subgroup an entity set into other entity sets that are distinct in some way with other entity sets.
- Specialisation is splitting up the entity set into further sub entity sets on the basis of their functionalities, specialities and features.
- It is a Top-Down approach.
- e.g., Person entity set can be divided into customer, student, employee. Person is superclass and other specialised
entity sets are subclasses.
- We have “is-a” relationship between superclass and subclass.
- Depicted by triangle component.
Why Specialisation?
Section titled “Why Specialisation?”- Certain attributes may only be applicable to a few entities of the parent entity set.
- DB designer can show the distinctive features of the sub entities.
- To group such entities we apply Specialisation, to overall refine the DB blueprint.
Generalisation
Section titled “Generalisation”- It is just a reverse of Specialisation.
- DB Designer, may encounter certain properties of two entities are overlapping. Designer may consider to make a new generalised entity set. That generalised entity set will be a super class.
- “is-a” relationship is present between subclass and super class.
- e.g., Car, Jeep and Bus all have some common attributes, to avoid data repetition for the common attributes. DB designer may consider to Generalise to a new entity set “Vehicle”.
- It is a Bottom-up approach.
Why Generalisation?
Section titled “Why Generalisation?”- Makes DB more refined and simpler.
- Common attributes are not repeated.
Attribute Inheritance
Section titled “Attribute Inheritance”- Both Specialisation and Generalisation, has attribute inheritance.
- The attributes of higher level entity sets are inherited by lower level entity sets.
- E.g., Customer & Employee inherit the attributes of Person.
Participation Inheritance
Section titled “Participation Inheritance”If a parent entity set participates in a relationship then its child entity sets will also participate in that relationship.
Aggregation
Section titled “Aggregation”- Aggregation is the technique to show relationship among relationships
- Abstraction is applied to treat relationships as higher-level entities. We can call it Abstract entity.
- Avoid redundancy by aggregating relationship as an entity set itself.