Entity Relationship Model
Entity Relationship Model
RELATIONSHIP
MODEL
1
What is an Entity
Relationship
Model?
An ERM represents the
structure of the database
Components of ER
Diagram
3
Entity
An entity can be either a living or non-
living component.
It showcases an entity as a rectangle in
an ER diagram.
4
Weak Entity
An entity that makes reliance
over another entity is called a
weak entity
You showcase the weak entity as
a double rectangle in ER Diagram.
In the figure, classroom is a weak
entity while school is a strong
entity.
5
Attribute
An attribute exhibits the properties of
an entity.
You can illustrate an attribute with an
oval shape in an ER diagram.
ENTITY-
RELATIONSHIP
MODEL
6
Key Attribute
Key attribute uniquely identifies
an entity from an entity set.
For example: For a student entity, the roll
number can uniquely identify a student
7
from a set of students.
Composite
Attribute
An attribute that is composed of
several other attributes is known
as a composite attribute.
8
Multivalued
Attribute
Some attributes can possess
over one value, those attributes
are called multivalued
attributes.
The double oval shape is used
to represent a multivalued
9
attribute.
Derived Attribute
An attribute that can be
derived from other
attributes of the entity is
known as a derived
attribute.
In the ER diagram, the dashed oval
represents the derived attribute.
10
Relationship
The diamond shape showcases a
relationship in the ER diagram.
It depicts the relationship
between two entities.
ENTITY-
RELATIONSHIP
MODEL
11
One to One
Relationship
When a single element of an
entity is associated with a single
element of another entity
12
For example: A student has only one
identification card and an identification
card is given to one person.
One to Many
Relationship
When a single element of an
entity is associated with more
than one element of another
entity.
For example, a customer can place many
orders, but an order cannot be placed by
many customers
13
Many to One
Relationship
When more than one element of an entity
is related to a single element of another
entity.
For example: Students have to opt for a
single course, but a course can have many
students.
14
Many to Many
Relationship
When more than one element of an
entity is associated with more than
one element of another entity.
For example, you can assign an employee
to many projects and a project can have
many employees.