Examples of E-R model

The ER (Entity-Relationship) model represents real-life scenarios as entities. The properties of these entities are their attributes, and their connections are shown as relationships. ER models help visualize how data is structured in a database system.

Hospital ER Model

This ER model has three entities − Patient, Doctor, and Tests ?

Patient ID (PK), Name Age, Visit_date Doctor ID (PK), Name Specialization Tests Name (PK), Date Result Consults Takes Conducts

Entities and their attributes −

  • Patient − ID (primary key), Name, Age, Visit_date
  • Tests − Name (primary key), Date, Result
  • Doctor − ID (primary key), Name, Specialization

Patients consult Doctors, Patients take Tests, and Doctors conduct Tests.

Company ER Model

This ER model has three entities − Employee, Department, and Project ?

Employee ENO (PK), Name Salary Department DNO (PK), Name Locations Project PNO (PK), Name Works For Controls Works On

Entities and their attributes −

  • Employee − ENO (primary key), Name, Salary
  • Department − DNO (primary key), Name, Locations
  • Project − PNO (primary key), Name

Employees work for Departments, Departments control Projects, and Employees work on Projects.

Conclusion

These ER model examples demonstrate how complex real-world scenarios can be simplified into entities (rectangles), attributes (properties), and relationships (diamonds). The Hospital model shows patient-doctor-test interactions, while the Company model captures employee-department-project associations.

Updated on: 2026-03-14T21:38:56+05:30

20K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements