Home | Computer | Elements of the E-R Model-Entities, Attribute, Relationship

Elements of the E-R Model-Entities, Attribute, Relationship

August 26, 2022

There are different elements of the E-R Model.


An entity is a thing, event, person, or place to which data is gathered and maintained. For example, a medical store may contain data about the MEDISIONS, PRICES, etc. A college system may include entities like STUDENT, TEACHER, CLASS, etc.

There are some examples of entities:






A rectangle symbol is used to represent the entity. The name of the entity is written inside the rectangle. The entity is used for three different purposes which are as follows.

Entity type

A group of entities with similar attributes is called entity type. In an entity type, all entities share common characteristics. This is also called an entity class. For example, the EMPLOYEE entity class is a set of all employees. Similarly, the DOCTOR entity type is a collection of all doctors, etc.

Entity Instance

A member of an entity class is known as an entity instance. It is also known as the entity occurrence. for each instance, each entity instance of an entity type has its own value

For example, A student Ali of STUDENT entity type is an entity instance.

Entity Set

At a given point of time, a set of all entities of a particular entity type in the database is called an entity set. For example, an entity set student may consist of all the students in the college. Another entity set teacher may consist of all the teachers in the college etc.

For both entity type and entity set, the same name is usually used. For example, BOOK refers to both an entity type as well as the current cell of all books in the database.


The characteristics of an entity are known as attributes or properties. For example, the Name of a student, his Address, Class, and Email address are his attributes. All instances of a particular entity class have the same attributes. E.g. All the student of the entity class has the same attributes like name, address, email, etc.


A relationship is a logical connection between different entities. The entity that participates in a relationship is called the participants. The relationship can be an entity and itself or multiple entities. A relationship is setup is based on the interface of these entities.

For example, a relationship exists between a DOCTOR and PATIENT because the doctor treats the Patient.

A relationship is called total if all entities of that entity set may be a participant in the relationship. A relationship is called partial if some of the entities of that entity set may be a participant in the relationship.

Suppose a relationship SUPP-PART exists between supplier and parts. A relationship is total if every part is supplied by a supplier. The relationship is partial if certain parts are available without a supplier.