Database Normalization is a method for organizing data to eliminate redundancy and anomalies in databases. It involves decomposing tables into a structured format, ensuring logical data storage and reducing issues like insertion, update, and deletion anomalies. The process is categorized into several normal forms, including First Normal Form (1NF), which requires single-valued attributes and consistent data types across columns.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0 ratings0% found this document useful (0 votes)
2 views
DBMS Notes
Database Normalization is a method for organizing data to eliminate redundancy and anomalies in databases. It involves decomposing tables into a structured format, ensuring logical data storage and reducing issues like insertion, update, and deletion anomalies. The process is categorized into several normal forms, including First Normal Form (1NF), which requires single-valued attributes and consistent data types across columns.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 7
‘Tutorials: Normalization in DBMS
Database Normalization is a technique of organizing the data in the database.
Normalization is a systematic approach of decomposing tables to eliminate data
redundancy (repetition) and undesirable characteristics like Insertion, Update and Deletion
Anomalies. It is a multi-step process that puts data into tabular form, removing duplicated
data from the relation tables.
Normalization is used for mainly two purposes,
+ Eliminating redundant (useless) data.
+ Ensuring data dependencies make sense i.e. data is logically stored.
Problems without Normalization
If table is not properly normalized and has data redundancy then it will not only eat up
extra memory space but will also make it difficult to handle and update the database,
without facing data loss. Insertion, Updation and Deletion Anomalies are very frequent if
database is not normalized. To understand these anomalies let us take an example of
a Student table.
rollno name 1 branch hod office tel
401 ‘Akon CSE Mr. X 53337
402 Bkon CSE Mr. X 53337
403 Con CSE Mr. X 53337
404 Dkon CSE Mr. X 53337,
In the table above, we have data of 4 Computer Sci. students. As we can see, data for the
fields branch, hod(Head of Department) and office_tel is repeated for the students who are in the
same branch in the college, this is Data Redundancy.
Insertion Anomaly
Suppose for a new admission, until and unless a student opts for a branch, data of the
student cannot be inserted, or else we will have to set the branch information as NULL.
‘Also, if we have to insert data of 100 students of same branch, then the branch information
will be repeated for all those 100 students.
‘These scenarios are nothing but Insertion anomalies.
Prepared By SKS, CST Page 1 of 18,Nowmalizalion
TH ts a technique to rem
Aeom a ‘eee or reduce lata wecuelaney
Redunclaney on coda clublicndy cam be to Tyfes—
‘) Row - level
2) Column. level
Roa Aevel olplicacy :
be ther
Th removethe hada duplicacg , We can e
SL Prien concept .
USE Primary Kef “fb Rmust be in 3rd Normal Form
> and, for each functional dependency ( X — Y ), X should be a super Key,
Fourth Normal Form (4NF)
A table is said to be in the Fourth Normal Form when,
1. It is in the Boyce-Codd Normal Form.
2. And, it doesn't have Multi-Valued Dependency.
What is First Normal Form (1NF)?
In our last tutorial we learned and understood how data redundancy or repetition can lead
to several issues like Insertion, Deletion and Updation anomalies and
how Normalization can reduce data redundancy and make the data more meaningful.
In this tutorial we will learn about the Ist Normal Form which is more like the Step 1 of the
Normalization process. The 1st Normal form expects you to design your table in such a way
that it can easily be extended and it is easier for you to retrieve data from it whenever
required.
If tables in a database are not even in the 1st Normal Form, it is considered as bad
database design.
Prepared By SKS, CST Page 3 of 18‘Tutorials: Normalization in DBMS
Rules for First Normal Form
‘The first normal form expects you to follow @ few simple rules while designing Your
database, and they are:
Rule 1: Single Valued Attributes
ach column of your table should be single valued which means they: should not contain
eattipte values. We will explain this with help of an example later; let's Se the other rules
for now.
Rule 2: Attribute Domain should not change
This is more of a"Common Sense" rule, 1m each column the values stored must be of the
same Kind or type:
For example: If you have a column deb to Sate date of births of a set of people, then YOO
For at or you must not save ‘names’ Of Som ietkem in that column along with 42/6 of
Cathy of others in that column, It should hhold only ‘date of birth’ for all the records/rows.
Rule 3: Unique name for Attributes/Columns
‘This rule expects that each column. in a table should have a unique name. This is to avoid
Jonfusion at the time of retrieving data oF performing any other operation on the stored
data.
columns have same name, then the DBMS system will be left confused.
If one or more
Rule 4: Order doesn't matters
‘This rule says that the order in which you store the data in your table doesn't matter.
‘Time for an Example
‘Although all the rules are self explanatory still let's take an example where we will create a
Uuble to store student data which will have “udent's roll no., their name and the name of
subjects they have opted for.
Prepared By SKS, CST Page 4 of 18Tutorials: Normalization in DBMS
Here is our table, with some sample data added to it.
roll_no name subject
101 Akon 08, CN
103 Ckon Java
102 Bkon C, CH
Our table already satisfies 3 rules out of the 4 rules, as all our column names are unique,
we have stored data in the order we wanted to and we have not inter-mixed different type of
data in columns,
But out of the 3 different students in our table, 2 have opted for more than 1 subject. And
we have stored the subject names in a single column. But as per the 1st Normal form each
column must contain atomic value.
How to solve this Problem?
It's very simple, because all we have to do is break the values into atomic values.
Here is our updated table and it now satisfies the First Normal Form.
roll_no name subject
101 Akon os
101 ‘Akon CN
103 Ckon Java
102 Bkon c
102 Bkon cH
By doing so, although a few values are getting repeated but values for the subject column,
are now atomic for each record/row.
Using the First Normal Form, data redundancy increases, as there will be many columns
with same data in multiple rows but each row as a whole will be unique.
Prepared By SKS, CST _ Page S of 18