Professional Documents
Culture Documents
TDB2073
Structured Programming & Database
Systems
Course Objectives
• Therefore , we need …
ge m en t
ma n a
Data
Library system
Travel booking system
Timetabling system
What is Conceptual Database Design?
Entity
Entity Attribute
Attribute Relationship
Relationship
EntityName
EntityName Verb phrase
List of
Attributes
Entity
• Examples of entities:
– Person: EMPLOYEE, STUDENT, PATIENT
– Place: STORE, WAREHOUSE
– Object: MACHINE, PRODUCT, CAR
– Event: SALE,REGISTRATION, RENEWAL
– Concept: ACCOUNT, COURSE
• Candidate key
– Attribute (or combination of attributes) that uniquely
identifies each instance of an entity type
– Some entities may have more than one candidate key
• Ex: A candidate key for EMPLOYEE is Employee_ID, a
second is the combination of Employee_Name and Address.
• If there is more than one candidate key, need to make a
choice.
• Identifier
– A candidate key that has been selected as the unique
identifying characteristic for an entity type
Attribute : Referential Attribute
• Make Reference to another instance in another table
Referential attribute:
Name
Name IdNum
IdNum DeptID
DeptID Email
Email
Ali
Ali 123367
123367 MH
MH ali@a.com
ali@a.com
Batyr
Batyr 106768
106768 CIS
CIS batyr@a.com
batyr@a.com
Rama
Rama 137563
137563 ENG
ENG rama@a.com
rama@a.com
Lim
Lim 108222
108222 FOU
FOU lim@a.com
lim@a.com
Instance of
Lecturer.
Example of Entity and Attribute in Chen Notation
DeptId email
IdNum Name
LECTURER
Candidate Key
attribute
Relationship
Associations
Associations between
between instances
instances of
of one
one oror more
more entity
entity types
types that
that is
is of
of interest
interest
Given
Given aa name
name that
that describes
describes its
its function.
function.
•• relationship
relationship name
name is
is an
an active
active or
or aa passive
passive verb.
verb.
Relationship name:
teaches
Lecturer
Student
How
Many??
Cardinality and Connectivity
Connectivity
Professor
1 teaches
M Class
(1,1) (1,4)
Cardinality
A professor teaches many class
A class is taught by at most one professor
A professor teaches minimum 1 class and maximum 4 classes
Developing an ER Diagram
Code BrCode
HAS BRANCH
BANK
Address
(1,1) (1,1)
Name
Street
City
HAS
HAS
(3,3) (1,3)
TypeNo TypeNo
ACCOUNT_TYPE LOAN_TYPE
Type HAS
Type
HAS
CUST_ACC CUST_LOAN
CustNo
CustNo
(1,3) (0,2)
TypeNo TypeNo
HAS HAS
(1,1)
(1,1)
DOB
CustAge CUSTOMER
CustNo
City CustAddr
CustName
Example of ERD Component
Summary