0% found this document useful (0 votes)
5 views19 pages

Normalization Slide

Uploaded by

qpelinsubc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views19 pages

Normalization Slide

Uploaded by

qpelinsubc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 19

Chapter 6

Normalization
Chapter 6 - Objectives
• The purpose of normalization.
• The problems associated with redundant data.
• The identification of various types of update anomalies
such as insertion, deletion, and modification anomalies.

• How to undertake the process of normalization.

• How to identify the most commonly used normal forms,


namely first (1NF), second (2NF), and third (3NF)
normal forms,

2
Normalization
• Main objective in developing a logical data model for
relational database systems is to create an accurate
representation of the data, its relationships, and
constraints.
• To achieve this objective, we must identify a suitable set
of relations.
• A technique for producing a set of relations with
desirable properties, given the data requirements of an
enterprise.
• Developed by E.F. Codd (1972).
• Often performed as a series of tests on a relation to
determine whether it satisfies or violates the
requirements of a given normal form. 4
Normalization
• Three most commonly used normal forms are
first (1NF), second (2NF), third (3NF)

• Based on functional dependencies among the


attributes of a relation.

• A relation can be normalized to a specific form to


prevent the possible occurrence of update
anomalies.
5
Data Redundancy
• Major aim of relational database design is to
group attributes into relations to minimize data
redundancy and reduce file storage space
required by base relations.

• Problems associated with data redundancy are


illustrated by comparing the Staff and Branch
relations with the Staff_Branch relation.

6
Data Redundancy

7
Data Redundancy
• Staff_Branch 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 (Branch_No) is repeated
in the Staff relation, to represent where each
member of staff is located.

8
Update Anomalies
• Relations that contain redundant information may
potentially suffer from update anomalies.
• Types of update anomalies include: Insertion, Deletion,
Modification

9
INSERTION ANOMALY
DELETION ANOMALY
MODIFICATION ANOMALY
Unnormalized Form (UNF)
• A table that contains one or more repeating
groups.
• To create an unnormalized table
– Transform the data from the information source
(e.g. form) into table format with columns and rows.

First Normal Form (1NF)


• A relation in which the intersection of each row
and column contains one and only one value.

14
UNF to 1NF
• Nominate an attribute or group of attributes to act
as the key for the unnormalized table.
• Identify the repeating group(s) in the
unnormalized table which repeats for the key
attribute(s).
• Remove the repeating group by
– Entering appropriate data into the empty columns of
rows containing the repeating data (‘flattening’ the
table).
Or by
– Placing the repeating data along with a copy of the
original key attribute(s) into a separate relation.15
Example 1 - Normalization Report

16
1NF -
REMOVE REPEATING GROUP

STUDENT(SID,Name,Tel,Address,Email, ExamOfficerId,OfficerName,ext)

STD_SUB (SID,SUBCODE, Description,CreditHR, Mark,Grade,Remark)

17
1NF to 2NF
• Identify the primary key for the 1NF relation.

• Identify the functional dependencies in the


relation.

• If partial dependencies exist on the primary key


remove them by placing then in a new relation
along with a copy of their determinant.

21
2NF -
REMOVE FUNCTIONAL DEPENDENCY

STUDENT(SID,Name,Tel,Address,Email, ExamOfficerId,OfficerName,ext)

STD_SUB (SID,SubCode,Mark,Grade,Remark)

SUBJECT (SubCode,Description,CreditHR)

17
2NF to 3NF
• Identify the primary key in the 2NF relation.

• Identify functional dependencies in the relation.

• If transitive dependencies exist on the primary


key remove them by placing them in a new
relation along with a copy of their dominant.

24
3NF -
REMOVE TRANSITIVE DEPENDENCY

STUDENT(SID,Name,Tel,Address,Email)
OFFICER(ExamOfficerId,OfficerName,ext)

STD_SUB (SID,SubCode,Description,CreditHR,Mark,Grade,
Remark)

SUBJECT (SubCode,Desc,CreditHR) 17

You might also like