Topic 4 Normalization
Topic 4 Normalization
Objectives
The purpose of normalization.
How normalization can be used when
designing a relational database.
The potential problems associated with
redundant data in base relations.
The concept of functional dependency, which
describes the relationship between attributes.
The characteristics of functional dependencies
used in normalization.
Objectives
How to identify functional dependencies for a
given relation.
How functional dependencies identify the
primary key for a relation.
How to undertake the process of
normalization.
How normalization uses functional
dependencies to group attributes into relations
that are in a known normal form.
Objectives
Purpose of Normalization
Normalization
Purpose of Normalization
Characteristics
include:
the minimal number of attributes necessary
to support the data requirements of the
enterprise;
attributes with a close logical relationship
are found in the same relation;
minimal redundancy with each attribute
represented only once with the important
exception of attributes that form all or part
of foreign keys.
Pearson Education 2009
Purpose of Normalization
8
Pearson Education 2009
10
11
AND
VS
12
13
Types
14
SName
Address
CourseCode
CName
S0144
Hamizah
Alor Setar
ASDIM
Ass. Dip
Multimedia
S0149
Amjadi
Bangi
CGMP200
Computer Power
200 (Graphic &
Multimedia)
S0157
Nurazean
KL
CITP100
Computer Power
100
S0159
Aidil Akmar
KL
CGMP200
Computer Power
200 (Graphic &
Multimedia)
S0035
Syed Rizal
Ipoh
DIPCGR
Dip Computer
Graphic &
Design
(null)
(null)
(null)
DIPES
Dip E-Secretary
15
SName
Address
CourseCode
Course
S0144
Hamizah
Alor Setar
ASDIM
Ass. Dip
Multimedia
S0149
Amjadi
Bangi
CGMP200
Computer Power
200 (Graphic &
Multimedia)
S0157
Nurazean
KL
CITP100
Computer
Power 100
S0159
Aidil Akmar
KL
CGMP200
Computer Power
200 (Graphic &
Multimedia)
S0035
Syed Rizal
Ipoh
DIPCGR
Dip Computer
Graphic &
Design
16
SName
Address
CourseCode
Course
S0144
Hamizah
Alor Setar
ASDIM
Ass. Dip
Multimedia
S0149
Amjadi
Bangi
CGMP200
Computer
Power 200
(Graphic &
Multimedia)
S0157
Nurazean
KL
CITP100
Computer Power
100
S0159
Aidil Akmar
KL
CGMP200
Computer
Power 200
(Graphic &
Multimedia)
S0035
Syed Rizal
Ipoh
DIPCGR
Dip Computer
Graphic &
Design
17
Solution to anomalies
StudNo
SName
Address
CourseCode
S0144
Hamizah
Alor Setar
ASDIM
S0149
Amjadi
Bangi
CGMP200
CourseCode
CName
S0157
Nurazean
KL
CITP100
ASDIM
S0159
Aidil Akmar
KL
CGMP200
CGMP200
S0035
Syed Rizal
Ipoh
DIPCGR
CITP100
DIPCGR
Student
Course
STUDENT_COURSE RELATION
STUDENT_COURSE
StudNo (PK)
SName
Address
CourseCode
CName
STUDENT
StudNo (PK)
SName
Address
CourseCode (FK)
COURSE
1..* register 1..1
CourseCode (PK)
CName
20
21
Functional Dependencies
Important
Functional
For
22
Diagrammatic
representation.
The
23
24
staffNo Name
Name staffNo
25
staffNo Name
26
This
27
28
29
30
Transitive Dependencies
Important
Transitive
31
Transitive
32
33
This
34
35
36
38
39
(fd1)
(fd2)
(fd3)
(fd4)
40
An
41
42
43
44
45
46
Pearson Education 2009
47
48
UNF to 1NF
49
UNF to 1NF
50
51
52
1NF to 2NF
53
54
55
2NF to 3NF
Identify
Identify
If
56
BoyceCodd
57
Every
58
The
59
60
63
The End..