Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 9

ADVANCED

DATABASES
ENTITY RELATIONSHIP DIAGRAM
(ERD)

Before we draw the actual ERD let us first define some terms as they
are used in ERD notation
Entity and Attribute

An entity is an object that exists and is distinguishable from other


objects.
Example: specific person, company, event, plant
Entities have attributes which are descriptive properties of an entity
Example: people have names and addresses
Types of Attributes

• Simple and composite attributes.


• Single-valued (atomic) and multi-valued attributes (non-atomic)
• E.g. multi-valued attribute: phone-numbers
• Derived attributes
• Can be computed from other attributes
• E.g. age, given date of birth
Entity with Composite, Multivalued,
and Derived Attributes
Relationship
A relationship is an association among several entities for example you
can have 2 entities Customer and Loan. The 2 can be related through the
borrower relationship as shown in the diagram below:
Specialization
• This a top-down design process used to
designate subgroupings within an entity set
that are distinctive from other entities in the
set.
• These subgroupings become lower-level entity
sets that have attributes or participate in
relationships that do not apply to the higher-
level entity set.
• It is depicted by a triangle component labelled
ISA (E.g. customer “is a” person).
Specialization Example
How about doing an ER
design interactively on
the board?

You might also like