0% found this document useful (0 votes)
24 views27 pages

Understanding Database Normalization

Normalization in DBMS is a design technique aimed at reducing data redundancy and improving data integrity by dividing larger tables into smaller, related tables. The process involves several normal forms, with the most commonly applied being the third normal form (3NF), which eliminates transitive dependencies. Normalization helps ensure efficient database performance, accurate data, and reduced storage space.

Uploaded by

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

Understanding Database Normalization

Normalization in DBMS is a design technique aimed at reducing data redundancy and improving data integrity by dividing larger tables into smaller, related tables. The process involves several normal forms, with the most commonly applied being the third normal form (3NF), which eliminates transitive dependencies. Normalization helps ensure efficient database performance, accurate data, and reduced storage space.

Uploaded by

aungtunmin155
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Introduction to

Normalization in
DBMS
What is a Normalization?
• Normalization is a design technique that reduces data redundancy (repetitive data) and eliminates
undesirable characteristics like insertion, update and deletion.
• Normalization rules divides larger tables into smaller tables and links them using relationships.
• The purpose of normalization is to eliminate redundant (repetitive) data and ensure data is stored logically.
Types of Normal Forms

There are total of 6th normal from, however in most practical applications, normalization achieves its best 3 rd
normal form.
History of Normalization
• The inventor of the relational model, Edgar [Link] proposed the theory of
normalization with the introduction of first normal form and he continued to extend
theory with second and third normal form.
• Codd then teamed up with Raymond [Link] to define the Boyce-Codd normal Form
(BCNF).
• Ronald Fagin introduced the fourth normal form.
• Fagin then introduced the fifth normal form.
Normalization Procedure
• The successive reduction of a given collection of relations to some more desirable form.
Reversible
It is always possible to take the output from the procedure and map it back to the input.
Non Loss Decomposition
The normalization procedure involves breaking down or decomposing a given relation into other relations
and moreover the decomposition is required to be reversible, no information is lost in the process
Example : Supplier Relation

Re-composition
The original relation is equal to the join of its projection.
Normalization Example
Non-normalized Relation ( 0NF )
• A relation that contains repeating groups, can be reduced to an equivalent normalized form.
• Example
Functional Dependencies
• A functional dependency (FD) is a relationship between two attributes, typically between the PK and other
non-key attributes within a table. For any relation R, attribute Y is functionally dependent on attribute X
(usually the PK), if for every valid instance of X, that value of X uniquely determines the value of Y. This
relationship is indicated by the representation :X Y

• The left side of the above FD diagram is called the determinant, and the right side is the
dependent.
Functional Dependencies (Example)
• SIN determines Name, Address and Birthdate. Given SIN, we can determine any of the other
attributes within the table.

• SIN and Course determine the date completed (DateCompleted). This must also work for a
composite PK.
First Normal Form (1NF)
• Every tuple contains exactly one value for each attribute and each record needs to be unique.

Example : Inventory database

Un-Normalized Database
First Normal Form (1NF)
First Normal Form (1NF)

1NF ( No multivalue )
Invoice (OID,O_Date, CID, C_Name, C_State , PID, P_Desc,P_Price,Qty)
Primary Key (OID,PID)
Function dependencies
OID,PID  Qty
OID  O_Date, CID, C_Name , C_State
PID  P_Desc , P_Price
Second Normal Form (2NF)
• Must be 1NF.
• Single column primary key that does not functionally dependent on any subset of candidate key
relation.
Second Normal Form (2NF)
Product_Order ( OID, PID, QTY)
Primary key  OID, PID
Function dependencies
OID, PID  Qty

Product ( PID, P_Desc, P_Price)


Primary key  PID
PID  P_Desc, P_Price

Order ( OID, O_date , CID, C_Name, C_State)


Primary key  OID
Function dependencies
OID  O_Date, CID
CID  C_Name, C_State
Third Normal Form (3NF)
• Must be 2NF.
• Has no transitive functional Dependencies
Transitive dependency
• A Transitive dependency in a database is an indirect relationship between values in the same
table that causes a functional dependency.
• By nature, a transitive dependency requires three or more attributes.
• To achieve the normalization standard of Third Normal Form (3NF), any transitive
dependency must be eliminated.
What are transitive functional
dependencies?
• A transitive functional dependency is when changing a non-key column, might cause any of
the other non-key columns to change.
Third Normal Form (3NF)
Product_Order ( OID, PID, QTY)
Primary key  OID, PID
Function dependencies
OID, PID  Qty

Product ( PID, P_Desc, P_Price)


Primary key  PID
PID P_Desc, P_Price

Order ( OID, O_Date, CID)


Primary key  OID
Functional dependencies
OID  CID

Customer ( CID, C_Name, C_State)


Primary key  CID
Functional dependencies
CID  C_Name, C_State
Others Normal Forms
Boyce-Codd Normal Form (BCNF)
Even when a database in 3rd normal form. Still there would be anomalies resulted if it has more than
one candidate key.
Sometimes BCNF is also referred as 3.5 Normal Form.
Fourth Normal Form (4NF)
If no database table instance contains two or more, independent and multivalued data describing the
relevant entity, then, it it in 4th normal form.
Fifth Normal Form
A table is in 5th normal form only if it is in 4NF and it cannot be decomposed into any number of
smaller tables without loss of data.
Sixth Normal Form
Sixth Normal Form is not standardized, yet however it is being discussed by database experts for
some time. Hopefully, we would have a clear & standardized definition for 6 th Normal Form in the
future…..
Summary
• Database designing is critical to the successful implementations of a database management system that
meets the data requirements of an enterprise system.

• Normalization in DBMS is a process which helps produce database systems that are cost-effective and
have better security models.

• Functional dependencies are very important component of the normalize data process.

• Most database systems are normalized database up to the third normal forms in DBMS.
What is database normalization?
• Designing databases that reduce data redundancy and imporove data integrity.

• Normalization is a process of breaking the table into multiple tables in such a way so
that the redundant data is reduced.

• This removes data inconsistencies and reduce storage space.

• Eliminating redundancy: saves storage space and simplifies updates.


Why normalize a database?
• There are a few reasons we would want to go through this process:
• Make the database more efficient
• Prevent the same data from being stored in more than one place (called an “insert anomaly”)
• Prevent updates being made to some data but not others (called an “update anomaly”)
• Prevent data not being deleted when it is supposed to be, or from data being lost when it is not
supposed to be (called a “delete anomaly”)
• Ensure the data is accurate
• Reduce the storage space that a database takes up
• Ensure the queries on a database run as fast as possible
• Normalization in a DBMS is done to achieve these points. Without normalization on a database,
the data can be slow, incorrect, and messy.
How to normalize a database?
• The process of normalization involves applying rules to a set of data. Each of these rules transforms the data
to a certain structure, called a Normal Form (NF).
• 1NF
• rows must be unique.
• Column data cannot have multiple values.
• 2NF
• Must be in 1NF.
• Must have a single column primary key, or..
• Must have columns that depend on each part of a composite key.
• 3NF
• Must be in 2NF.
• Move fields that are NOT dependent on the key.
Normalization Example
Unnormalized Form(UNF)
First Normal Form (1NF)
Second Normal Form (2NF)
Third Normal Form (3NF)
Thanks you

You might also like