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

Topic 3 - Normalization

The document discusses normalization, which is a data modeling technique for organizing data in a database. It describes various normal forms including first, second, third, and higher normal forms. The goals of normalization are to reduce duplication, inconsistencies, improve data integrity and avoid certain types of anomalies. An example of normalization of an invoice database is also provided.

Uploaded by

miragelimited91
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)
15 views19 pages

Topic 3 - Normalization

The document discusses normalization, which is a data modeling technique for organizing data in a database. It describes various normal forms including first, second, third, and higher normal forms. The goals of normalization are to reduce duplication, inconsistencies, improve data integrity and avoid certain types of anomalies. An example of normalization of an invoice database is also provided.

Uploaded by

miragelimited91
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

Conceptual Data Modeling:

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

 Remove repeating groups and


propagate higher level primary keys by
partitioning the un-normalized relation

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

 Remove any partial dependencies by


partitioning the relation
 A relation that is in FNF and has no
composite key is necessarily in SNF!
Normalization 6
Third Normal Form
 A relation is in TNF if and only if it is in
SNF and every non-key attribute is
independent of all other non‑key
attributes

 Remove any non-key attributes that


depend on other non-key dependencies
(transitive dependencies)
Normalization 7
Functional Dependency
 Given a relation R, attribute Y of R is
functionally dependent on attribute X of
R, if and only if each X-value in R has
associated with it precisely one Y-value
in R (at any one time)
R.X R.Y
(R.X functionally determines R.Y)

Normalization 8
Transitive Dependency
 A B C

 If B depends on A and C depends on B,


then C transitively depends on A via B
Example Staff No name, salary, branchno, address

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

 Little practical importance

Normalization 19

You might also like