Examples of E-R model

ER model is used to represent real life scenarios as entities. The properties of these entities are their attributes in the ER diagram and their connections are shown in the form of relationships.

Some examples of ER model are −

Hospital ER Model

This is an ER model of a Hospital. The entities are represented in rectangular boxes and are Patient, Tests and Doctor.

Each of these entities have their respective attributes which are −

  • Patients - ID(primary key), name, age,visit_date

  • Tests- Name(primary key), date, result

  • Doctor- ID(primary key), name, specialization

The relationships between different entities are represented by a diamond shaped box.

Company ER Model

The entities in this ER model are Employee, Department and Project. These entities have the following attributes −

  • Employee - ENO(Primary Key) , Name, Salary

  • Department - DNO(Primary key), Name, Locations

  • Project - PNO(Primary key), Name

The relationships in this ER model are represented as Works for and Controls.