Professional Documents
Culture Documents
20210711061633D3408 - ISYS6169 Session 9 Normalization
20210711061633D3408 - ISYS6169 Session 9 Normalization
Year : 2021
NORMALIZATION
Session 9
LEARNING OUTCOME
Bina Nusantara
Normalization
1NF
1NF
1NF 3NF
2NF
3NF
2NF
2NF
3NF
Bina Nusantara
gerardnico.com
Purpose of Normalization
Bina Nusantara
How Normalization Supports
Database Design
Bina Nusantara
Data Redundancy and Update
Anomalies
• Database Design group attributes into relations to
minimize data redundancy
• Potential benefits for implemented database include:
Bina Nusantara
Data Redundancy and Update
Anomalies
Bina Nusantara
Data Redundancy and Update
Anomalies
• StaffBranch relation has redundant data; the details
of a branch are repeated for every member of staff.
• In contrast, the branch information appears only
once for each branch in the Branch relation and only
the branch number (branchNo) is repeated in the
Staff relation, to represent where each member of
staff is located.
• Relations that contain redundant information may
potentially suffer from update anomalies.
• Types of update anomalies include : Insertion,
Deletion, and Modification
Bina Nusantara
Lossless-join and Dependency
Preservation Properties
• Two important properties of decomposition.
– Lossless-join property enables us to find any
instance of the original relation from
corresponding instances in the smaller
relations.
– Dependency preservation property enables us
to enforce a constraint on the original
relation by enforcing some constraint on
each of the smaller relations.
Bina Nusantara
Functional Dependencies
Bina Nusantara
Characteristics of Functional
Dependencies
• Property of the meaning or semantics of the
attributes in a relation.
• Diagrammatic representation.
Bina Nusantara
An Example Functional
Dependency
Bina Nusantara
Example Functional
Dependency that holds for all
Time
• Consider the values shown in staffNo and sName
attributes of the Staff relation (see the tables).
• Based on sample data, the following functional
dependencies appear to hold.
staffNo → sName
sName → staffNo
staffNo → sName
Bina Nusantara
Types of Functional
Dependency
Bina Nusantara
Full Functional Dependency
Bina Nusantara
Characteristics of Functional
Dependencies
• Main characteristics of functional dependencies used
in normalization:
– There is a one-to-one relationship between the
attribute(s) on the left-hand side (determinant)
and those on the right-hand side of a functional
dependency.
– Holds for all time.
– The determinant has the minimal number of
attributes necessary to maintain the dependency
with the attribute(s) on the right hand-side.
Bina Nusantara
Transitive Dependency
Bina Nusantara
Example - Identifying a set of
functional dependencies for the
StaffBranch relation
Bina Nusantara
Example - Identifying a set of
functional dependencies for the
StaffBranch relation
Bina Nusantara
Example - Using sample data to
identify functional
dependencies.
• Consider the data for attributes denoted A, B, C,
D, and E in the Sample relation (see on the next
slide ).
Bina Nusantara
Example - Using sample data to
identify functional
dependencies.
Bina Nusantara
Example - Using sample data to
identify functional
dependencies.
• Function dependencies between attributes A to E
in the Sample relation.
AC (fd1)
CA (fd2)
B D (fd3)
A, B E (fd4)
Bina Nusantara
The Process of Normalization
http://entrepreneurship.mit.edu/entrepreneurship-need-keep-calm-trust-process/
The Process of Normalization
Bina Nusantara
The Process of Normalization
Bina Nusantara
Unnormalized Form
(UNF)
• A table that contains one or more repeating
groups.
their determinant.
1NF to 2NF
Second
Third normal
normal form
form (3NF)
(2NF)
http://www.sqa.org.uk/e-learning/SoftDevRDS02CD/page_12.htm
Convert into an unnormalised table (UNF). The process is as follows:
•Create column headings for the table for each data item on the report (ignoring any
calculated fields). A calculated field is one that can be derived from other information on the
form. In this case total staff and average hourly rate.
•Enter sample data into table (this data is not simply the data on the report but a
representative sample. In this example it shows several employees working on several projects.
The same employee can work on different projects and at a different hourly rate).
•Identify a key for table (and underline it).
•Remove duplicate data (in this example, for the chosen key of Project Code, the values for
Project Code, Project Title, Project Manager and Project Budget are duplicated if there are two
or more employees working on the same project).
UNF
1NF
2NF
3NF
www.healthytravelblog.com