ER Model

ER Model is a popular high-level (conceptual) data model.It is an approach to designing Semantic Conceptual schema of a Database.

ER model allows us to describe the data involved in a real-world environment in terms of objects and their relationships, which are widely used in design of database. ER model provides preliminary concepts or idea about the data representation which is later modified to achieve final detailed design.

Important concepts/notions used in ER modeling are

Entity is an object in real-world or some idea or concept which can be distinguished from other objects.
Ex: person, school, class, department, weather, salary, temperature etc.
Entity has independent existence. Each entity belongs to an Entity type that defines the structure. Entity Set is a Collection of similar objects.

Attribute: reflects a property of an object or entity. We have following types of attributes.
  • Simple attribute
  • Composite attribute
  • Single valued attribute
  • Multi-valued attribute
  • Derived attribute
  • Stored attribute
Key : Is an Attribute of an entity type whose value can uniquely identify an entity in a set.

Relationship: The association between entities is known as relationship.

Domain of an attribute: The set of possible values is known as domain of an attribute

Notations used in ER Notations used in ER modeling are shown below.

Notations used in ER


Special Notations

Special Notations used in ER


Relationships in ER

Relationships in ER


Degree of a Relationship
If there are two entity types involved it is a binary relationship type

binary relationship


If there are three entity types involved it is a ternary relationship type

ternary relationship


Unary relationships are also known as a recursive relationship

Unary relationships


It is possible to have n-ary relationship (e.g. quaternary or unary).

Cardinality of a relationship
Relationships are rarely one-to-one. For example, a manager usually manages more than one employee. This is described by the cardinality of the relationship, for which there are four possible categories.
  • One to one (1:1) relationship
  • One to many (1:M) relationship
  • Many to one (M:1) relationship
  • Many to many (M:N) relationship