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

NORMALISATION

Uploaded by

midhulasrikj3053
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)
8 views19 pages

NORMALISATION

Uploaded by

midhulasrikj3053
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
You are on page 1/ 19

NORMALISATION

BY
Dr.JJ
Normalization

• Making relations very large.


• It isn't easy to maintain and update data as it
would involve searching many records in
relation.
• Wastage and poor utilization of disk space and
resources.
• The likelihood of errors and inconsistencies
increases.
How to handle it?
• Analyze and decompose the relations with
redundant data into smaller, simpler, and well-
structured relations that are satisfy desirable
properties.
• Normalization is a process of decomposing
the relations into relations with fewer
attributes.
What is Normalization?

• Normalization is the process of organizing the data in


the database.
• Normalization is used to minimize the redundancy
from a relation or set of relations.
• It is also used to eliminate undesirable characteristics
like Insertion, Update, and Deletion Anomalies.
• Normalization divides the larger table into smaller and
links them using relationships.
• The normal form is used to reduce redundancy from
the database table.
Data modification anomalies can be
categorized into three types
• Insertion Anomaly: Insertion Anomaly refers to
when one cannot insert a new tuple into a
relationship due to lack of data.
• Deletion Anomaly: The delete anomaly refers to
the situation where the deletion of data results in
the unintended loss of some other important data.
• Updatation Anomaly: The update anomaly is when
an update of a single data value requires multiple
rows of data to be updated.
Anomalies in DBMS Examples
Employee

p_id emp_name emp_address emp_dept

101 Rick Delhi D001

101 Rick Delhi D002

123 Maggie Agra D890

166 Glenn Chennai D900

166 Glenn Chennai D004


• Update anomaly: to update the address of
Rick
• Insert anomaly:Suppose a new employee
joins the company, who is under training and
currently not assigned to any department
• Delete anomaly: Suppose, if at a point of time
the company closes the department D890
then deleting the rows that are having
emp_dept as D890 would also delete the
information of employee Maggie since she is
assigned only to this department.
First Normal Form (1NF)

• A relation will be 1NF if it contains an atomic


value.
• It states that an attribute of a table cannot
hold multiple values. It must hold only single-
valued attribute.
• First normal form disallows the multi-valued
attribute, composite attribute, and their
combinations.
Relation EMPLOYEE is not in 1NF because of
multi-valued attribute EMP_PHONE.

EMP_ID EMP_NAME EMP_PHONE EMP_STATE

14 John 7272826385, UP
9064738238

20 Harry 8574783832 Bihar

12 Sam 7390372389, Punjab


8589830302
The decomposition of the EMPLOYEE table into 1NF has been
shown below:
EMP_ID EMP_NAME EMP_PHONE EMP_STATE

14 John 7272826385 UP

14 John 9064738238 UP

20 Harry 8574783832 Bihar

12 Sam 7390372389 Punjab

12 Sam 8589830302 Punjab


Exercise 1

https://www.tutorialspoint.com/dbms/database_normalization.htm
Exercise 2

https://www.guru99.com/database-normalization.html
Second Normal Form
2NF
• In the 2NF, relational must be in 1NF.
• In the second normal form, all non-key
attributes are fully functional dependent on
the primary key
Second Normal Form

• Prime attribute − An attribute, which is a part of the


candidate-key, is known as a prime attribute.
• Non-prime attribute − An attribute, which is not a part
of the prime-key, is said to be a non-prime attribute.
• If we follow second normal form, then every non-prime
attribute should be fully functionally dependent on
prime key attribute.
• That is, if X → A holds, then there should not be any
proper subset Y of X, for which Y → A also holds true.
Prime key attributes are Stu_ID and
Proj_ID.
Stu_Name can be identified by Stu_ID and
Proj_Name can be identified by Proj_ID
independently. This is called partial
dependency, which is not allowed in
Second Normal Form.
We broke the relation in two as depicted in the above
picture. So there exists no partial dependency.
Closure Of Functional Dependency : Introduction

• The Closure Of Functional Dependency means the


complete set of all possible attributes that can be
functionally derived from given functional
dependency using the inference rules known as
Armstrong’s Rules.
• If “F” is a functional dependency then closure of
functional dependency can be denoted using “{F}
+
”.
• There are three steps to calculate closure of
functional dependency. These are:
• Closure Of Functional Dependency
https://minigranth.in/dbms-tutorial/closure-of-
functional-dependency

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy