Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Unit 4: Database Design & Development

ERD (Entity Relationship Diagram) Part 2

1
E-R Diagram: Chen Model
• Entity
• represented by a rectangle with its name in
capital letters.

• Relationships
• represented by an active or passive verb
inside the diamond that connects the
related entities.

• Connectivities
• i.e., types of relationship
• written next to each entity box.

2
E-R Diagram: Crow’s Foot Model

• Entity
• represented by a rectangle with its name in capital
letters.

• Relationships
• represented by an active or passive verb that
connects the related entities.

• Connectivities
• indicated by symbols next to entities.
• 2 vertical lines for 1
• “crow’s foot” for M

3
Crow’s Foot Connections
DEGREE OF RELATIONSHIP

The number of entity sets that


participate in a relationship set.

Ishani Jayasuriya - DDD - RQF


DEGREE OF RELATIONSHIP
Unary (Degree 01) :
Relationship among instances of one entity type.
( Also known as Recursive or Self – referential
relationship )

E.g. : Employee (who is a manger) manage other Employees.

Employee Manage

Ishani Jayasuriya - DDD - RQF


DEGREE OF RELATIONSHIP
Binary (Degree 02) :
Relationship among instances of two entity types.

E.g. : Customer place Orders

Customer Place Order

Ishani Jayasuriya - DDD - RQF


DEGREE OF RELATIONSHIP
Ternary (Degree 03) :
Simultaneous relationship among instances of three
entity types.

E.g. : Supplier supply Items for Project.

Supplier Supply Item

Ishani Jayasuriya - DDD - RQF


Project
Converting Ternary to binary
DEGREE OF RELATIONSHIP
N-ary (Degree more than 03) :
Simultaneous relationship among instances of more
than three entity types.
E.g. : Supplier supply Items for Project via Shipment.

Shipment

Supplier Supply Item

Ishani Jayasuriya - DDD - RQF


Project
Generalization
▪ Generalization is more like subclass and superclass
system, but the only difference is the approach.
Generalization uses the bottom-up approach.
▪ In generalization, an entity of a higher level can also
combine with the entities of the lower level to form a
further higher level entity.

11
Generalization

12
Specialization

▪ Specialization is used to identify the subset of an entity


set that shares some distinguishing characteristics.
▪ Normally, the superclass is defined first, the subclass
and its related attributes are defined next, and
relationship set are then added.

13
Specialization

14
Thank You !

15

You might also like