You are on page 1of 22

Entity Relationship

Diagram
(ERD)
CONTENTS
What is an ER diagram?
History of ER models
Uses of entity relationship diagrams
The components and features of an ER diagram
ERD symbols and notations
Limitations of ER diagrams and models
How to draw a basic ER diagram
References
What is an ER diagram?
type of flowchart
The ER diagram defines the conceptual view of a
database. It works around real-world entities and the
associations among them. At view level, the ER model
is considered a good option for designing databases.
History of ER models
Peter Pin-Shan Chen

Entityrelationship modeling was


developed for database design by Peter
Chen and published in a 1976 paper.

However, variants of the idea existed


previously. Some ER modelers show
super and subtype entities connected
by generalization-specialization
relationships, and an ER model can be
used also in the specification of
domain-specific ontologies.
Uses of entity
relationship diagrams
Database design
Database troubleshooting
Business information systems
Business process re-engineering
Education
Research
The components and
features of an ER diagram
ER Diagrams are composed of entities,
relationships and attributes. They also depict
cardinality, which defines relationships in terms
of numbers.
Entity: which is represented by rectangles. An
entity is an object or concept about which you
want to store information.
Examples: a customer,
student, car or product.
The components and
features of an ER diagram
A weak entity is an An associative entity
entity that must associates entities (or
defined by a foreign key elements) within an
relationship with entity set.
another entity as it
cannot be uniquely
identified by its own
attributes alone.
The components and
features of an ER diagram
Entity keys: Refers to an attribute that uniquely defines an
entity in an entity set. Entity keys can be super, candidate
or primary.
Super key: A set of attributes (one or more) that together
define an entity in an entity set.
Candidate key: A minimal super key, meaning it has the
least possible number of attributes to still be a super key.
An entity set may have more than one candidate key.
Primary key: A candidate key chosen by the database
designer to uniquely identify the entity set.
Foreign key: Identifies the relationship between entities.
The components and
features of an ER diagram
Relationship
How entities act upon each other Recursive relationship: The
or are associated with each other. same entity participates
Think of relationships as verbs. For more than once in the
example, the named student might relationship.
register for a course. The two
entities would be the student and
the course, and the relationship
depicted is the act of enrolling,
connecting the two entities in that
way. Relationships are typically
shown as diamonds or labels
directly on the connecting lines.
The components and
features of an ER diagram
Attributes; which are represented by ovals. A
key attribute is the unique, distinguishing
characteristic of the entity. For example, an
employee's social security number might be
the employee's key attribute.
The components and
features of an ER diagram
A multivalued A derived attribute is
attribute can have based on another
more than one attribute. For example,
an employee's
value. For example, monthly salary is
an employee entity based on the
can have multiple employee's annual
skill values. salary.
The components and
features of an ER diagram
Defines the numerical attributes of the
relationship between two entities or entity
sets. The three main cardinal relationships
are one-to-one, one-to-many, and many-
many. A one-to-one example would be
one student associated with one mailing
address. A one-to-many example (or
many-to-one, depending on the
relationship direction): One student
registers for multiple courses, but all those
courses have a single line back to that one
student. Many-to-many example:
Students as a group are associated with
multiple faculty members, and faculty
members in turn are associated with
multiple students.
ERD symbols and notations
There are many
notation styles that
express cardinality.

Information
Engineering Style:
ERD symbols and notations
ERD symbols and notations
ERD symbols and notations
ERD symbols and notations
ERD symbols and notations
Limitations of ER
diagrams and models
Only for relational data: Understand that the purpose is to show relationships.
ER diagrams show only that relational structure.
Not for unstructured data: Unless the data is cleanly delineated into different
fields, rows or columns, ER diagrams are probably of limited use. The same is
true of semi-structured data, because only some of the data will be useful.
Difficulty integrating with an existing database: Using ER Models to integrate
with an existing database can be a challenge because of the different
architectures.
How to draw a basic ER
diagram
Purpose and scope: Define the purpose and scope of what youre analyzing or
modeling.
Entities: Identify the entities that are involved. When youre ready, start drawing
them in rectangles (or your systems choice of shape) and labeling them as
nouns.
Relationships: Determine how the entities are all related. Draw lines between
them to signify the relationships and label them. Some entities may not be
related, and thats fine. In different notation systems, the relationship could be
labeled in a diamond, another rectangle or directly on top of the connecting
line.
Attributes: Layer in more detail by adding key attributes of entities. Attributes
are often shown as ovals.
Cardinality: Show whether the relationship is 1-1, 1-many or many-to-many.

https://www.youtube.com/watch?v=QpdhBUYk7Kk
References
https://www.smartdraw.com/entity-relationship-diagram/

https://www.slideshare.net/mudasirqazi00/database-entity-relationship-
diagram-erd?qid=9e71a77a-fedc-4d9a-b468-8090d75a691a&v=&b=&from_search
=2

https://www.slideshare.net/pramodredekar/erd-examples?qid=9e71a77a-f
edc-4d9a-b468-8090d75a691a&v=&b=&from_search=10

https://www.lucidchart.com/documents/edit/c8bfb9dc-84f4-42f7-99a7-835e
c37977db#
22

You might also like