3. ENTITY RELATIONSHIP MODEL CONCEPTS
The ER model defines the conceptual view/logical
structure of a database.
An ER model is a design or blueprint of a database that
can later be implemented as a database.
The Entity-Relation model represents real-world entities
and the relationship between them.
A real-world thing either living or non-living.
This model is based on three basic concepts:
Entities
Attributes
Relationships
4. NOTATION FOR ER DIAGRAM
Entity
It may be a physical thing or simply a fact about the enterprise or
an event that happens in the real world.
An entity can be place, person, object, event or a concept, which
stores data in the database.
Examples: a customer, student, car or product.
Notation : Rectangle
Relationship
How two or more entities are related to each other.
Association between two or more entities.
Entities take part in relationships.
For example, an employee works in a department, a
student enrolls in a course are called relationship
Notation : Diamond
Entity_Name
Taught
By
Student Faculty
5. NOTATION FOR ER DIAGRAM
Entity set:
An entity set is a group of similar kind of entities. It may
contain entities with attribute sharing similar values.
E.g. Students registered in a particular program and enroll in
various courses. A lecturer from the specific department takes
each course, and each lecturer teaches various group of
students.
Attributes:
Entities are said to hold certain characteristics or properties
called attributes.
All attributes have values. For example, a student entity may
have rollno., name, class, age, phone, address, email etc. as
attributes.
Notation : Oval or Ellipse
Roll No
7. NOTATION FOR ER DIAGRAM
Types of Attributes :
Simple and Composite Attributes:
Simple attributes are atomic values, which cannot be divided further. e.g. roll
no, phone no
Composite attributes are made of more than one simple attribute. They can be
divided into simple attributes e.g. name can be divided into first name, middle
name and last name, similarly address can be divided into city, state, pin etc.
Single-value and Multi-value Attributes:
Single-value attributes contain single value e.g. Aadhar no., PAN etc.
Multi-value attributes may contain more than one values e.g. phone no. and
email .
Derived Attributes:
Attributes whose value can be calculated or derived by some other attribute
present e.g. age can be derived from D.O.B.
They do not exist in the physical database, but their values are derived from
other attributes.
8. TYPES OF ATTRIBUTES & NOTATIONS
Simple and Composite
Attributes
Single-value and Multi-
value Attributes
Derived Attributes
Simple Attribute : Oval
e.g.
Single Value : Oval Derived :
Dashed oval
Composite Attribute :
branched ovals
e.g.
Multi-Value :
Double oval
Roll No
Name
First_
Name
Middle_Name
Last_Name
Phone No.