Entity/Relationship Modelling
Entity/Relationship Modelling
Entity/Relationship Modelling
In This Lecture
• Entity/Relationship models
• Entities and Attributes
• Relationships
• Attributes
• E/R Diagrams
One Many
many relationships
• An entity represents Module
In
Student
Student
Student
Enrols In Student
Takes
Enrols In Student
Takes
Enrols In Student
Takes
Enrols In Student
Takes
Takes
Description Product
Street address
Description Product
Description Product
Has A
Has
ID
(2) Find instances of the Enrolment entity
Enrolment
Code with the same Code as the result of (1)
In
Code
(1) Find the instance of the Module
Module
Title entity with title ‘Database Systems’
Entity Relationship Modelling
This Lecture in Exams
(and coursework last year)
“A database will be made to store information about patients in a
hospital. On arrival, each patient’s personal details (name,
address, and telephone number) are recorded where possible,
and they are given an admission number. They are then
assigned to a particular ward (Accident and Emergency,
Cardiology, Oncology, etc.). In each ward there are a number
of doctors and nurses. A patient will be treated by one doctor
and several nurses over the course of their stay, and each
doctor and nurse may be involved with several patients at any
given time.”