Conceptual Design Lecture 3

Conceptual Design
Revision
Database Development
Basic constructs of the
Entity Relationship Model
Entity
 Representation of an Entity on an ER
diagram is:
– a box with square corners
– labelled with the entity name.
Note – the entity name is always singular
Student
Basic constructs of the
Entity Relationship Model
Weak Entity
 Representation of a Weak Entity on
an ER diagram is:
– a box with rounded corners
– labelled with the entity name (singular)
NextOfKin
Basic constructs of the
Entity Relationship Model
Strong Entity
 By default an entity which is not a
weak entity is a strong entity.
Student
ER Model Relationship Types
One to One
– An employee is allocated a single
parking space, a parking space belongs
to only one employee.
Employee
1:1
ParkingSpace
ER Model Relationship Types
One to Many
– A department has many employees
assigned to it, each employee is
assigned to only one department.
Department
1:M
Employee
ER Model Relationship Types
Many to Many
– An employee attends many staff
development sessions, each staff
development session is attended by
many employees.
StaffDevSess
N:M
Employee
ER Model Relationship Types
Many to Many
– An employee attends many staff
development sessions, each staff
development session is attended by
many employees.
StaffDevSess
N:M
Employee
ER Model Relationship Types
Inheritance
– A technician is a
kind of employee
about whom we
wish to record, in
addition to his
other attributes,
his highest
technical
qualification.
Employee
Technician
ER Model Relationship
Existence
 In
the ER model optional association
existence is shown as.
 An
employee may be a member of
one of the works football teams.
FootballTeam
1:M
Employee
ER Model Relationship
Existence
 In
the ER model mandatory
association existence is shown as.
 An
employee must be a member of
one of the unions recognised by the
company.
Union
1:M
Employee
ER Model Relationship
Recursive relationship.
 An employee may also be a manager.
A number of employees are managed
by a single manager
Employee Manager
Employee
1:M
Attributes
What is an attribute?
 An attribute is a piece of information
about the object or event that we wish
to store in our database.
 It can be said to describe the object.
 An example of some possible attributes
for Employee could be EmployeeID,
EmpFirstName, EmpSurname
ER Model Representation of
Attributes
 Only
attributes which uniquely
identify an entity will be represented
on your ER diagram.
 A key attribute may be represented
as follows
EmployeeID
Employee
ER Diagram
Attribute
Relationship
Attribute name
HallName
StudentID
STUDENT
N:1
Cardinality
Entity
Mandatory
Existence
HALL
Entity Name
Optional
Existence
Diagram Script
Entity name
Attributes Identified Synonym
Related to
Course
title
courseCode
Student
Class
Course
Student
studentID
studentName
address
postcode
Course
Class
semester
classRoom
uniqueClassName
tutor
Course
Relationship between
course and student
grade
Course and
Student
Prerequisite
Using the Information Base
 Where
do we start?
 Analyse the information gathered
during the requirements analysis.
– One element at a time
Identifying Entities
A noun is a word that names a person or
thing
 A noun phrase is a group of words that
operate like a noun e.g. dentist
appointment
 Consider each noun or noun phrase and
determine if it is a candidate entity.
 Reasons for rejecting candidate entities.

Rejecting Candidate Entities
 Redundancy
 Vagueness
 An
event or operation
 Meta Language
 Outside the system boundary
 Attribute
Next Week
 In-class
test