DBMS ER model concept
← prevnext →
ER (Entity Relationship)
Diagram in DBMS
2 Jun 2025 | 9 min read
ER model stands for an Entity-Relationship model. It is a high-
level data model. This model is used to define the data elements
and relationship for a specified system.
It develops a conceptual design for the database. It also
develops a very simple and easy to design view of data.
In ER modeling, the database structure is portrayed as a
diagram called an entity-relationship diagram.
For example, Suppose we design a school database. In this database, the
student will be an entity with attributes like address, name, id, age, etc.
The address can be another entity with attributes like city, street name,
pin code, etc and there will be a relationship between them.
Properties of E- R Model:
Following are the list of properties of E-R model:
It is used to represent the E-R model that can be easily
converted into relational model.
It is a top-down approach to design database.
ER diagram is used by developers for designing database that
can be used in various database management systems.
It provides useful concepts that help designers understand the
need of end users and implement those entities.
It is very simple, non-technical free from ambiguities and easy
to understand by different types of users, programmers and
designers as specific parameters are used for their
representation.
It provides a standard and logical way of visualizing data.
It provides an accurate understanding of the nature of data.
E- R Model Terminology:
Names Meaning
Entity It represents as objects in which information can be
stored e.g. specific room, specific student etc.
Attribute Properties or characteristics of entities. E.g.
Registration_number, Section cof entity student
Relationships It maintains relationship between various entities.
Degree of Number of entities associated with a relationship.
relationships
Component of ER Diagram
1. Entity:
An entity may be any object, class, person or place. In the ER diagram, an
entity can be represented as rectangles.
Consider an organization as an example- manager, product, employee,
department etc. can be taken as an entity.
Properties of Entity:
An entity is characterized by a set of properties called its
attributes.
Entity is atomic and cannot be divided into smaller pieces.
This is an instance of the entity type so it is represented in the
E-R diagram as a rectangular box with its name.
Consider an organization as an example- manager, product, employee,
department etc. can be taken as an entity.
Types of Entity:
a. Weak Entity
An entity that depends on another entity called a weak entity. The weak
entity doesn't contain any key attribute of its own. Double rectangle is
used to represent weak entity.
b. Strong Entity
An entity that has a primary key is called strong entity set. It is the one
that exists on its own, independent of other.
Following are the difference between Weak Entity Set and Strong
Entity Set
SR. Weak Entity Set Strong Entity
No Set
1. This entity set does not contain This entity set contains
required attributes from the attributes from a primary
primary key. key.
2. Double rectangle is used for Single rectangle is used for
represented weak entity set. represented strong entity
set.
3. It contains a partial key or It has a primary key. This is
2. Entity Type
It is a collection of entities that have the same attributes but different
values. Entities that are uniquely indentified but share similar properties
or attributes from an entity type.
Properties of Entity type:
An entity type is indentified by its name and properties.
It is represented as a rectangular box enclosing the name of the
entity type.
3. Entity Set
It is a collection of all instances of a particular entity type at any given
time in the database. Each entity set is represented by its name and
attribute values. It has the same name as the entity type.
4. Attribute
The attribute is used to describe the property of an entity. Eclipse is used
to represent an attribute.
Properties of Attribute:
An entity attribute must be unique.
Attributes must uniquely identify the entity.
A domain is a set of allowed values for each attribute from its
value is selected.
An entity attribute is represented in an ER diagram as an ellipse
connected to the entity by a line labeled with the entity name.
For example, id, age, contact number, name, etc. can be attributes of a
student.
Following are list of Attributes:
a. Key Attribute
The key attribute is used to represent the main characteristics of an
entity. It represents a primary key. The key attribute is represented by an
ellipse with the text underlined.
b. Composite Attribute
An attribute that composed of many other attributes is known as a
composite attribute. The composite attribute is represented by an ellipse,
and those ellipses are connected with an ellipse.
c. Multivalued Attribute
An attribute can have more than one value. These attributes are known
as a multivalued attribute. The double oval is used to represent
multivalued attribute.
For example, a student can have more than one phone number.
d. Derived Attribute
An attribute that can be derived from other attribute is known as a
derived attribute. It can be represented by a dashed ellipse.
For example, A person's age changes over time and can be derived from
another attribute like Date of birth.
e. Simple Attribute:
The simple attribute is also known as the atomic attribute i.e. it cannot
be divide into smaller parts. It includes single component and has
independent existence. For example: price of book etc.
4. Relationship
Relationship is used to describe the relationship between entities.
A relationship type is collection of relationships of the same type from a
relationship set.
A specific instance of a relationship is known as a relationship instance.
A relationship can contain one or more entities and belongs to a specific
relationship type.
Relationships are categorized in terms of:
Degree
Cardinality
Connectivity
Directions
Relationships are represented by a diamond or rhombus symbol with the
name of the relationship written inside the diamond. The sides of a
diamond are associated with the type of organization it belongs to.
Following are list of relationship are as follows:
a. One-to-One Relationship
When only one instance of an entity is associated with the relationship,
then it is known as one to one relationship.
For example, A female can marry to one male, and a male can marry to
one female.
b. One-to-many relationship
When only one instance of the entity on the left, and more than one
instance of an entity on the right associates with the relationship then
this is known as a one-to-many relationship.
For example, Scientist can invent many inventions, but the invention is
done by the only specific scientist.
c. Many-to-one relationship
When more than one instance of the entity on the left, and only one
instance of an entity on the right associates with the relationship then it
is known as a many-to-one relationship.
For example, Student enrolls for only one course, but a course can have
many students.
d. Many-to-many relationship
When more than one instance of the entity on the left, and more than
one instance of an entity on the right associates with the relationship
then it is known as a many-to-many relationship.
For example, Employee can assign by many projects and project can
have many employees.
Degree of Relationship
It represent the number of entities involved in the relationship. In
general, if a relation is of "n-ary" type then its degree is "n".
The following are the types of degree of relationship:
Unary Relationship/Recurrence relation: When the
association exists within an entity type it is called a unary
relationship. The degree of Unary relationship is 1.
Binary Relationship: When an association exists within two
entity types it is called a binary relationship. The degree of
binary relationship is 2.
Ternary Relationship: When the association exists between
three entity types. It is referred as ternary relationship. The
degree of ternary relationship is 3.
Quaternary Relationship: When the association exists across
four entity types. This is called a quadratic relationship. The
degree of ternary relationship is 4. It is rarely used and is
decomposed into one or more binary relationships. For
example: The relationship that represents a situation where a
student is taught by a teacher with the help of course material
studies a subject.
Cardinality of Relationship
A cardinality of a relationship measures the relationship between entities
by calculating how many instances of one entity type are related to a
single instance of another. This is the actual number of elements
associated with the connectivity called cardinality. It is rarely used. This
relationship is illustrated by having an appropriate number of variables
in the instances. In ER diagrams, cardinality is indicated by placing
appropriate numbers next to the units, using the format(x,y). In this
format, first value represents the minimum number of related entities
and the second value represents the maximum number of related entries.
For Example: If the company policy does not allow more than 20
employees in a department, the priority is indicated by giving the
appropriate number in addition to the units shown below:
The cardinality (0,20) written to the DEPARTMENT entity. The employee
relationship in DEPERTMNET shows that a department can have a
maximum of 20 employees and a minimum of 0, if the department is in
its initial stages. The cardinality (1,1) employee relation written to the
employee entity in department indicates that an employee can work in
only one department.
A relationship can have cardinality of 0. Such a relationship is known as
optimal relationship. The relationship is indicated by the Conditional
tense. For Example: An employee can assign a project. If a relationship
has a cardinality of atleast 1 then the relationship is mandatory. These
relationships are indicated by words such as must have. For example: A
students must register for atleast 3 subjects in each semester.
Direction of Relationship
A degree of relationship is a line connecting two entities related to each
other by a relationship. The entity from which the relationship starts is
the parent entity and the entity where the relationship ends is called the
child entity. The type of relationship is determined by the direction of the
line connecting the units and the parts of the relationship.
The different types of relationships can be one-to-one, one-to-many,
many-to-one, many-to-many which can be represented by the following
guidelines:
Multiple Choice questions on ER Model:
1. In a list of following symbol which is used to represent the entity
in an Entity relational diagram?
1. Diamond
2. Rectangle
3. Square
4. Ellipse
Answer: b
Explanation:
Rectangle symbol is used to represent by an entity with its name.
2. An entity whose entity is the primary key in a relational diagram
is called?
1. Strong Entity
2. Weak Entity
3. Entity sets
4. Entity type
Answer: a
Explanation:
An entity that is the primary key in an entity relational diagram is called
a strong entity.
3. The link between two or more entity in Entity relational diagram
is called?
1. Entity set
2. Degree
3. Domain
4. Relationship
Answer: d
Explanation:
An association between two or more entities in an entity relational
diagram is called a relationship.
4. When an association exists between three entities it is called?
1. Binary Relationship
2. Unary Relationship
3. Quaternary Relationship
4. Ternary Relationship
Answer: d
Explanation:
An entity relational diagram has a relationship between three entity
types called ternary relationship.
5. What type of trait does the following symbol represent?
1. Single Attribute
2. Multi-Valued Attribute
3. Key Attribute
4. Composite Attribute
Answer: b
Explanation:
It is an attribute that holds multiple values for a particular entity.
Next TopicDBMS Notation for ER diagram