Designing ERDs
Designing ERDs
Designing ERDs
ERD
Data Focused view of an IS
Defining an ERD 2
Entity
Relationship
Attribute
ER-Diagrams: General Information 4
Multi-valued
Has several vales Phone_num
Person can have several numbers Street
Derived/calculated
Tax
Computed from other attributes
9
Example with attributes
street city
name address
id DOB
Student
title
birthday
id
M N
Actor acts-in Film year
name
address type
*The ERD here shows that several actors act in several films
*This means, one actor is associated with many films, and one film is associated with a
number of actors.
Types of Relationships 12
phone
number
manages
id
Employee Manages
worker
name
address
Binary
14
Relates two entities
Can be 1: 1; 1 : M; M:N
id 1 M
Director Directs Film title
name
Item_Id
Item Supp_Id
Cust_Id
Student Y Y Y
Course N Y
Sponsor N
Dept
Produce ERD 20
Step 4 and 5 can be combined, that is produce the ERD from the
matrix.
Resolve M:N relationships
Resulting ERD (Step 4 & Step 5) 21
Stud_Id
Stud_Id
M N
Student
takes Course
M
M
M
has enr
oll run by
s- in
Dept_Name
Stud_Id N 1
Sponsor 1
Dept.
Data analysis 22