Professional Documents
Culture Documents
Screenshot 2023-11-04 at 2.20.18 PM
Screenshot 2023-11-04 at 2.20.18 PM
Topic 4:
Entity Relationship Modelling 2
Learning Outcomes
By the end of this topic, students will be able to:
• Construct an ER model from a scenario
• Understand the purpose of a primary key
• Understand the role of foreign keys
• Recognise strong and weak entities
• Identify and solve problems in ER models
Solution
Worker Worker skill
skill Skill
1 0...* 0...* 1
0...*
Attributes - 1
Client
Primary Key ------------
clientNo(PK)
name
Uniquely identifies each fname
lname
occurrence of an entity telNo
Attributes - 2
Client
Foreign Key ------------
Preference
clientNo(PK)
-------------
name
prefType
Links entities fname
maxRent
lname
clientNo(FK)
into relationships telNo
Taken by
V
Attributes:
0...*
Student
Student No(PK)
Student Name
0...*
Student Attributes:
on
Module Code (FK)
Module
Student No (FK)
0...*
1 Attributes:
Student No(PK)
Student
Student Name
-1 C1 London Campus
C2 Lagos
C3 Cairo
1...* 1 1...* 1
Staff Department Campus
-2 C1
C2
London
Lagos
Campus
C3 Cairo
Chasm Trap - 1
Branch Branch
ID Name Branch Which Branch manages
1 Ilford
‘Hill House’?
2 Redbridge
1 0...*
Chasm Trap - 2
Branch Branch We now know which
ID Name Branch Branch manages ‘Hill
1 Ilford
House’
2 Redbridge
0...* 1
CUSTOMER
1
0...*
0...* 1
MODEL RESERVATION
1 0...*
References
• Connolly, T. & Begg, C. (2004). Database Systems:
A Practical Approach to Design, Implementation,
and Management, 4th Edition. Addison Wesley.
Chapter 11.
Any Questions?