Topic 3 - Normalization
Topic 3 - Normalization
Normalization
Normalization 1
Normalization
Normalization is a data analysis technique
for producing a set of relations with
desirable properties
Several levels of normalization: Basic level -
First (FNF), Second (SNF), and Third (TNF)
Normal. Also Fourth Normal Form, Fifth
Normal Form
It is the TNF that is usually used as the
basis for the design of the data model and
for mapping onto a database
Normalization 2
Advantages of Normalization
It is a formal technique with each stage of
normalization process eliminating a
particular type of undesirable dependency
It highlights constraints and dependencies in
the data and hence aids in understanding the
nature of data
The TNF produces well‑designed databases
which provide a higher degree of
independence
Normalization 3
Un-normalized Form
A relation that contains one or more
repeating groups i.e. repeated values
for particular attributes with a single
record
Normalization 4
First Normal Form
A relation is said to be in FNF if and
only it contains no repeating groups
Normalization 5
Second Normal Form
A relation is in SNF if and only if it is in FNF
and every non-key attribute is fully
functionally dependent on the key attribute
Normalization 8
Transitive Dependency
A B C
branch No address
Normalization 9
Normalization Steps
Represent the un-normalized relation
List Attributes
Identify Repeating Groups
Identify Key Attributes
Convert to FNF
By removing Repeating Groups
Understand the Dependencies
Functional Dependency Diagrams may be used
Normalization 10
Normalization Steps
Convert to SNF
by removing partial dependencies
Convert to TNF
by removing transitive dependencies
Normalization 11
Normalization Steps
Rationalize the Results
Consider whether to combine any resulting
relations that have identical keys
Discard any relations that is redundant i.e.
its attributes are contained within another
relation
Identify foreign keys
Review the names of the relations to ensure
they reflect the information content
Normalization 12
Normalization Example:
Un-normalized Relation
INVOICE Subtotal
InvoiceNo Shipping
CustomerNo
Vat
CustomerName
Address Grandtotal
City Paymentmode
Phone Ccno
Date Ccname
OrderNo
Ccexpiry
Rep
FOB Authorizationcode
Code
Description
Qty Repeating
UnitPrice Group
Total
Normalization 13
Normalization Example: FNF
INVOICE Paymentmode
InvoiceNo Ccno
CustomerNo Ccname
CustomerName Ccexpiry
Address Authorizationcode
City
Phone
Date PRODUCT
OrderNo InvoiceNo
Rep Code
FOB Description
Subtotal Qty
Shipping UnitPrice
Vat Total
Grandtotal
Normalization 14
Normalization Example: SNF
INVOICE Paymentmode
InvoiceNo Ccno
CustomerNo Ccname
CustomerName Ccexpiry
Address Authorizationcode
City INVOICE-PRODUCT
Phone InvoiceNo
Date Code
OrderNo Qty
Rep Total
FOB PRODUCT
Subtotal Code
Shipping Description
Vat UnitPrice
Grandtotal
Normalization 15
Normalization Example: TNF
INVOICE CREDIT
InvoiceNo Ccno
Ccname
CustomerNo * Ccexpiry
Date
ORDER
OrderNo * OrderNo
Subtotal Rep
Shipping FOB
Vat INVOICE-PRODUCT
Grandtotal InvoiceNo
Paymentmode Code
Ccno * Qty
Authorizationcode Total
PRODUCT
CUSTOMER Code
CustomerNo Description
CustomerName UnitPrice
Address
City
Phone
Normalization 16
Example - ERD
Customer
Invoice Order
Product Invoice-Product
Normalization 17
Fourth Normal Form
Fourth Normal Form is concerned with
multi-valued dependencies
A functional dependency indicates that for
each value of X there is one value of Y
A multi-valued dependency states that for
each value of attribute X there is a finite
set of values of Y
Example Book/Authors
Normalization 18
Fifth Normal Form
Fifth Normal Form is concerned with
relations which cannot be partitioned
into two relations without losing
information, but can be partitioned into
three or more relations
Normalization 19