SlideShare a Scribd company logo
1 of 6
Download to read offline
What is Database Normalization?Explain the guidelines for ensuring that database are
normalized.
Solution
Here is the answer for your respective question on database normalization:
Before going to know about database normalization we should know about database.
So what is a database?
Its like a repository where all the data related to a particular organization are stored inside the
tables in the form of columns and rows
which can be related to the employees working in that organization or about the finacial and
accounts of the company etc.
While storing data into the tables there might be some problems like duplicate entries of the
same record related to a particular person which creates a problem named data redundancy in the
database.
So to avoid this there's been introduced a concept named Normalization.
So what is Database Normalization?
Database normalization or simply called normalization, is the process of arranging or organizing
the columns
and tables of a relational database to reduce data redundancy and improve data integrity and
efficiency of data stored.
Normalization arranges attributes in tables based on dependencies between attributes,
ensuring that the dependencies are properly enforced by database integrity constraints.
Normalization can be achieved by applying some formal rules like synthesis or decomposition.
To come to the types of normalizations there are many.Some of them are as follows:
1NF - First Normal Form
2NF - Second Normal Form
3NF - Third Normal Form
BCNF - Boyce–Codd Normal Form
4NF - Fourth Normal Form
Basic guidelines for normalization:
1NF - First Normal Form:
As per First Normal Form, no two Rows of data must contain repeating group of information.
Each table should be organized into rows and each row should have a primary key that
distinguishes it as unique.
Example for 1NF:
Student Age Subject
Andrea 15 Zoology
Andrea 15 Social Studies
Alan 14 Maths
Stuart 17 Maths
But by 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.
2NF - Second Normal Form:
There must not be any partial dependency of any column on primary key.
Meaning that for a table that has concatenated primary key, each column in the table
that is not part of the primary key must depend upon the entire concatenated key for its
existence,failing which the table fails Second normal form.
Example:
Student Age
Andrea 15
Alex 14
Stuart 17
Here we should maintain a separate table for the value subject by doing which we can reduce
data redundancy which is lacking in 1NF.
In the above table,candidate key will be Student column, because all other column i.e Age is
dependent on it.
3NF - Third Normal Form:
Third normal form (3NF) is a database principle that allows you to properly
arrange our tables by building upon the database normalization principles provided by 1NF and
2NF.
There are two basic requirements for a database to be in third normal form:
It should meet the requirements of both 1NF and 2NF
Should remove columns that are not fully dependent upon the primary key.
For example, in the below table, street name, city, and state are unbreakably bound to the zip
code.
CREATE TABLE EMPLOYEE(
EMP_ID INT NOT NULL,
EMP_NAME VARCHAR (20) NOT NULL,
STREET VARCHAR(200),
CITY VARCHAR(100),
STATE VARCHAR(100),
ZIP VARCHAR(12),
PRIMARY KEY (EMP_ID)
);
The dependency between zip code and address in the above shown query is called a transitive
dependency.
To change it to third normal form(3NF), all we need to do is move the Street, City, and State
fields into their own table.
CREATE TABLE ADDRESS(
ZIP VARCHAR(12),
STREET VARCHAR(200),
CITY VARCHAR(100),
STATE VARCHAR(100),
PRIMARY KEY (ZIP)
);
Next, alter the EMPLOYEE table as follows:
CREATE TABLE EMPLOYEE(
EMP_ID INT NOT NULL,
EMP_NAME VARCHAR (20) NOT NULL,
ZIP VARCHAR(12),
PRIMARY KEY (EMP_ID)
);
The advantage of removing transitive dependency is,
1.Amount of data duplication is reduced.
2.Data integrity achieved.
BCNF - Boyce–Codd Normal Form:
This form deals with certain type of anamolies that are not handled by 3NF.
A 3NF table which does not have multiple overlapping candidate keys is said to be in BCNF.
Following conditions must be satisfied:
R must be in 3rd Normal Form
and, for each functional dependency ( X -> Y ), X should be a super Key.
4NF - Fourth Normal Form :
It should meet all the requirements of 3NF
Attribute of one or more rows in the
table should not result in more than one rows of the same table leading to multi-valued
dependencies.
Here is the answer for your respective question on database normalization:
Before going to know about database normalization we should know about database.
So what is a database?
Its like a repository where all the data related to a particular organization are stored inside the
tables in the form of columns and rows
which can be related to the employees working in that organization or about the finacial and
accounts of the company etc.
While storing data into the tables there might be some problems like duplicate entries of the
same record related to a particular person which creates a problem named data redundancy in the
database.
So to avoid this there's been introduced a concept named Normalization.
So what is Database Normalization?
Database normalization or simply called normalization, is the process of arranging or organizing
the columns
and tables of a relational database to reduce data redundancy and improve data integrity and
efficiency of data stored.
Normalization arranges attributes in tables based on dependencies between attributes,
ensuring that the dependencies are properly enforced by database integrity constraints.
Normalization can be achieved by applying some formal rules like synthesis or decomposition.
To come to the types of normalizations there are many.Some of them are as follows:
1NF - First Normal Form
2NF - Second Normal Form
3NF - Third Normal Form
BCNF - Boyce–Codd Normal Form
4NF - Fourth Normal Form
Basic guidelines for normalization:
1NF - First Normal Form:
As per First Normal Form, no two Rows of data must contain repeating group of information.
Each table should be organized into rows and each row should have a primary key that
distinguishes it as unique.
Example for 1NF:
Student Age Subject
Andrea 15 Zoology
Andrea 15 Social Studies
Alan 14 Maths
Stuart 17 Maths
But by 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.
2NF - Second Normal Form:
There must not be any partial dependency of any column on primary key.
Meaning that for a table that has concatenated primary key, each column in the table
that is not part of the primary key must depend upon the entire concatenated key for its
existence,failing which the table fails Second normal form.
Example:
Student Age
Andrea 15
Alex 14
Stuart 17
Here we should maintain a separate table for the value subject by doing which we can reduce
data redundancy which is lacking in 1NF.
In the above table,candidate key will be Student column, because all other column i.e Age is
dependent on it.
3NF - Third Normal Form:
Third normal form (3NF) is a database principle that allows you to properly
arrange our tables by building upon the database normalization principles provided by 1NF and
2NF.
There are two basic requirements for a database to be in third normal form:
It should meet the requirements of both 1NF and 2NF
Should remove columns that are not fully dependent upon the primary key.
For example, in the below table, street name, city, and state are unbreakably bound to the zip
code.
CREATE TABLE EMPLOYEE(
EMP_ID INT NOT NULL,
EMP_NAME VARCHAR (20) NOT NULL,
STREET VARCHAR(200),
CITY VARCHAR(100),
STATE VARCHAR(100),
ZIP VARCHAR(12),
PRIMARY KEY (EMP_ID)
);
The dependency between zip code and address in the above shown query is called a transitive
dependency.
To change it to third normal form(3NF), all we need to do is move the Street, City, and State
fields into their own table.
CREATE TABLE ADDRESS(
ZIP VARCHAR(12),
STREET VARCHAR(200),
CITY VARCHAR(100),
STATE VARCHAR(100),
PRIMARY KEY (ZIP)
);
Next, alter the EMPLOYEE table as follows:
CREATE TABLE EMPLOYEE(
EMP_ID INT NOT NULL,
EMP_NAME VARCHAR (20) NOT NULL,
ZIP VARCHAR(12),
PRIMARY KEY (EMP_ID)
);
The advantage of removing transitive dependency is,
1.Amount of data duplication is reduced.
2.Data integrity achieved.
BCNF - Boyce–Codd Normal Form:
This form deals with certain type of anamolies that are not handled by 3NF.
A 3NF table which does not have multiple overlapping candidate keys is said to be in BCNF.
Following conditions must be satisfied:
R must be in 3rd Normal Form
and, for each functional dependency ( X -> Y ), X should be a super Key.
4NF - Fourth Normal Form :
It should meet all the requirements of 3NF
Attribute of one or more rows in the
table should not result in more than one rows of the same table leading to multi-valued
dependencies.

More Related Content

Similar to What is Database NormalizationExplain the guidelines for ensuring t.pdf

Normalization.ppt
Normalization.pptNormalization.ppt
Normalization.pptNIDHISAHU71
 
Chapter 4 notes DBMS.pdf
Chapter 4 notes DBMS.pdfChapter 4 notes DBMS.pdf
Chapter 4 notes DBMS.pdfSubrahmanya6
 
Lecture 6.pptx
Lecture 6.pptxLecture 6.pptx
Lecture 6.pptxDilanAlmsa
 
Ben Finkel- Using the order by clause.pptx
Ben Finkel- Using the order by clause.pptxBen Finkel- Using the order by clause.pptx
Ben Finkel- Using the order by clause.pptxStephenEfange3
 
Inner join and outer join
Inner join and outer joinInner join and outer join
Inner join and outer joinNargis Ehsan
 
Database Normalization
Database NormalizationDatabase Normalization
Database NormalizationArun Sharma
 
Data normailazation
Data normailazationData normailazation
Data normailazationLalit Kale
 
Dependencies in various topics like normalisation and its types
Dependencies in various topics like normalisation and its typesDependencies in various topics like normalisation and its types
Dependencies in various topics like normalisation and its typesnsrChowdary1
 
Sql ch 9 - data integrity
Sql ch 9 - data integritySql ch 9 - data integrity
Sql ch 9 - data integrityMukesh Tekwani
 

Similar to What is Database NormalizationExplain the guidelines for ensuring t.pdf (20)

T-SQL Overview
T-SQL OverviewT-SQL Overview
T-SQL Overview
 
Database normalization
Database normalizationDatabase normalization
Database normalization
 
Normalization.ppt
Normalization.pptNormalization.ppt
Normalization.ppt
 
Sql wksht-6
Sql wksht-6Sql wksht-6
Sql wksht-6
 
Chapter 4 notes DBMS.pdf
Chapter 4 notes DBMS.pdfChapter 4 notes DBMS.pdf
Chapter 4 notes DBMS.pdf
 
Primera forma normal
Primera forma normalPrimera forma normal
Primera forma normal
 
Research gadot
Research gadotResearch gadot
Research gadot
 
Lecture 6.pptx
Lecture 6.pptxLecture 6.pptx
Lecture 6.pptx
 
Ben Finkel- Using the order by clause.pptx
Ben Finkel- Using the order by clause.pptxBen Finkel- Using the order by clause.pptx
Ben Finkel- Using the order by clause.pptx
 
Inner join and outer join
Inner join and outer joinInner join and outer join
Inner join and outer join
 
Normalization
NormalizationNormalization
Normalization
 
Integrity and security
Integrity and securityIntegrity and security
Integrity and security
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
Fg d
Fg dFg d
Fg d
 
Data normailazation
Data normailazationData normailazation
Data normailazation
 
Dependencies in various topics like normalisation and its types
Dependencies in various topics like normalisation and its typesDependencies in various topics like normalisation and its types
Dependencies in various topics like normalisation and its types
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Sql DML
Sql DMLSql DML
Sql DML
 
Sql DML
Sql DMLSql DML
Sql DML
 
Sql ch 9 - data integrity
Sql ch 9 - data integritySql ch 9 - data integrity
Sql ch 9 - data integrity
 

More from arjunstores123

Money and Our Monetary SystemThe monetary system in any economy fa.pdf
Money and Our Monetary SystemThe monetary system in any economy fa.pdfMoney and Our Monetary SystemThe monetary system in any economy fa.pdf
Money and Our Monetary SystemThe monetary system in any economy fa.pdfarjunstores123
 
JAVAFor the code in which I implemented most of the quick select a.pdf
JAVAFor the code in which I implemented most of the quick select a.pdfJAVAFor the code in which I implemented most of the quick select a.pdf
JAVAFor the code in which I implemented most of the quick select a.pdfarjunstores123
 
Investigators are conducting a cohort study to determine whether wom.pdf
Investigators are conducting a cohort study to determine whether wom.pdfInvestigators are conducting a cohort study to determine whether wom.pdf
Investigators are conducting a cohort study to determine whether wom.pdfarjunstores123
 
In the class we extensively discussed a node class called IntNode in.pdf
In the class we extensively discussed a node class called IntNode in.pdfIn the class we extensively discussed a node class called IntNode in.pdf
In the class we extensively discussed a node class called IntNode in.pdfarjunstores123
 
In January of 2012, the second stop for a Republican to get votes to.pdf
In January of 2012, the second stop for a Republican to get votes to.pdfIn January of 2012, the second stop for a Republican to get votes to.pdf
In January of 2012, the second stop for a Republican to get votes to.pdfarjunstores123
 
I need some help answering these three questions listed below.1. A.pdf
I need some help answering these three questions listed below.1. A.pdfI need some help answering these three questions listed below.1. A.pdf
I need some help answering these three questions listed below.1. A.pdfarjunstores123
 
hi i need to produce a 300 word report on the construction of struct.pdf
hi i need to produce a 300 word report on the construction of struct.pdfhi i need to produce a 300 word report on the construction of struct.pdf
hi i need to produce a 300 word report on the construction of struct.pdfarjunstores123
 
HTML elements are split into two types “block” elements and “inline.pdf
HTML elements are split into two types “block” elements and “inline.pdfHTML elements are split into two types “block” elements and “inline.pdf
HTML elements are split into two types “block” elements and “inline.pdfarjunstores123
 
How does multicore differ from a classic multiprocessing environment.pdf
How does multicore differ from a classic multiprocessing environment.pdfHow does multicore differ from a classic multiprocessing environment.pdf
How does multicore differ from a classic multiprocessing environment.pdfarjunstores123
 
How the non-dense index worksHow the non-dense index works.pdf
How the non-dense index worksHow the non-dense index works.pdfHow the non-dense index worksHow the non-dense index works.pdf
How the non-dense index worksHow the non-dense index works.pdfarjunstores123
 
Given below is the response of several types of temperature sensors. .pdf
Given below is the response of several types of temperature sensors. .pdfGiven below is the response of several types of temperature sensors. .pdf
Given below is the response of several types of temperature sensors. .pdfarjunstores123
 
Genetic recombination can occur in many different stages. Identify t.pdf
Genetic recombination can occur in many different stages. Identify t.pdfGenetic recombination can occur in many different stages. Identify t.pdf
Genetic recombination can occur in many different stages. Identify t.pdfarjunstores123
 
For every one NADH molecule oxidized at complex I, how many TOTAL hy.pdf
For every one NADH molecule oxidized at complex I, how many TOTAL hy.pdfFor every one NADH molecule oxidized at complex I, how many TOTAL hy.pdf
For every one NADH molecule oxidized at complex I, how many TOTAL hy.pdfarjunstores123
 
Find the domain of the function. (Enter your answer using interval no.pdf
Find the domain of the function. (Enter your answer using interval no.pdfFind the domain of the function. (Enter your answer using interval no.pdf
Find the domain of the function. (Enter your answer using interval no.pdfarjunstores123
 
explain as specifically as possible how each of the following helps .pdf
explain as specifically as possible how each of the following helps .pdfexplain as specifically as possible how each of the following helps .pdf
explain as specifically as possible how each of the following helps .pdfarjunstores123
 
Each of the following lymphatic structures in the correct category ba.pdf
Each of the following lymphatic structures in the correct category ba.pdfEach of the following lymphatic structures in the correct category ba.pdf
Each of the following lymphatic structures in the correct category ba.pdfarjunstores123
 
Answer the following questions from the Article belowExercise #1..pdf
Answer the following questions from the Article belowExercise #1..pdfAnswer the following questions from the Article belowExercise #1..pdf
Answer the following questions from the Article belowExercise #1..pdfarjunstores123
 
All answers are in the form of TrueFalse with a explantion as to wh.pdf
All answers are in the form of TrueFalse with a explantion as to wh.pdfAll answers are in the form of TrueFalse with a explantion as to wh.pdf
All answers are in the form of TrueFalse with a explantion as to wh.pdfarjunstores123
 
Consider miRNA target sites, How do these compare to transcription fa.pdf
Consider miRNA target sites, How do these compare to transcription fa.pdfConsider miRNA target sites, How do these compare to transcription fa.pdf
Consider miRNA target sites, How do these compare to transcription fa.pdfarjunstores123
 
Anaerobic Respiration & Fermentation (Microbiology)What are the bu.pdf
Anaerobic Respiration & Fermentation (Microbiology)What are the bu.pdfAnaerobic Respiration & Fermentation (Microbiology)What are the bu.pdf
Anaerobic Respiration & Fermentation (Microbiology)What are the bu.pdfarjunstores123
 

More from arjunstores123 (20)

Money and Our Monetary SystemThe monetary system in any economy fa.pdf
Money and Our Monetary SystemThe monetary system in any economy fa.pdfMoney and Our Monetary SystemThe monetary system in any economy fa.pdf
Money and Our Monetary SystemThe monetary system in any economy fa.pdf
 
JAVAFor the code in which I implemented most of the quick select a.pdf
JAVAFor the code in which I implemented most of the quick select a.pdfJAVAFor the code in which I implemented most of the quick select a.pdf
JAVAFor the code in which I implemented most of the quick select a.pdf
 
Investigators are conducting a cohort study to determine whether wom.pdf
Investigators are conducting a cohort study to determine whether wom.pdfInvestigators are conducting a cohort study to determine whether wom.pdf
Investigators are conducting a cohort study to determine whether wom.pdf
 
In the class we extensively discussed a node class called IntNode in.pdf
In the class we extensively discussed a node class called IntNode in.pdfIn the class we extensively discussed a node class called IntNode in.pdf
In the class we extensively discussed a node class called IntNode in.pdf
 
In January of 2012, the second stop for a Republican to get votes to.pdf
In January of 2012, the second stop for a Republican to get votes to.pdfIn January of 2012, the second stop for a Republican to get votes to.pdf
In January of 2012, the second stop for a Republican to get votes to.pdf
 
I need some help answering these three questions listed below.1. A.pdf
I need some help answering these three questions listed below.1. A.pdfI need some help answering these three questions listed below.1. A.pdf
I need some help answering these three questions listed below.1. A.pdf
 
hi i need to produce a 300 word report on the construction of struct.pdf
hi i need to produce a 300 word report on the construction of struct.pdfhi i need to produce a 300 word report on the construction of struct.pdf
hi i need to produce a 300 word report on the construction of struct.pdf
 
HTML elements are split into two types “block” elements and “inline.pdf
HTML elements are split into two types “block” elements and “inline.pdfHTML elements are split into two types “block” elements and “inline.pdf
HTML elements are split into two types “block” elements and “inline.pdf
 
How does multicore differ from a classic multiprocessing environment.pdf
How does multicore differ from a classic multiprocessing environment.pdfHow does multicore differ from a classic multiprocessing environment.pdf
How does multicore differ from a classic multiprocessing environment.pdf
 
How the non-dense index worksHow the non-dense index works.pdf
How the non-dense index worksHow the non-dense index works.pdfHow the non-dense index worksHow the non-dense index works.pdf
How the non-dense index worksHow the non-dense index works.pdf
 
Given below is the response of several types of temperature sensors. .pdf
Given below is the response of several types of temperature sensors. .pdfGiven below is the response of several types of temperature sensors. .pdf
Given below is the response of several types of temperature sensors. .pdf
 
Genetic recombination can occur in many different stages. Identify t.pdf
Genetic recombination can occur in many different stages. Identify t.pdfGenetic recombination can occur in many different stages. Identify t.pdf
Genetic recombination can occur in many different stages. Identify t.pdf
 
For every one NADH molecule oxidized at complex I, how many TOTAL hy.pdf
For every one NADH molecule oxidized at complex I, how many TOTAL hy.pdfFor every one NADH molecule oxidized at complex I, how many TOTAL hy.pdf
For every one NADH molecule oxidized at complex I, how many TOTAL hy.pdf
 
Find the domain of the function. (Enter your answer using interval no.pdf
Find the domain of the function. (Enter your answer using interval no.pdfFind the domain of the function. (Enter your answer using interval no.pdf
Find the domain of the function. (Enter your answer using interval no.pdf
 
explain as specifically as possible how each of the following helps .pdf
explain as specifically as possible how each of the following helps .pdfexplain as specifically as possible how each of the following helps .pdf
explain as specifically as possible how each of the following helps .pdf
 
Each of the following lymphatic structures in the correct category ba.pdf
Each of the following lymphatic structures in the correct category ba.pdfEach of the following lymphatic structures in the correct category ba.pdf
Each of the following lymphatic structures in the correct category ba.pdf
 
Answer the following questions from the Article belowExercise #1..pdf
Answer the following questions from the Article belowExercise #1..pdfAnswer the following questions from the Article belowExercise #1..pdf
Answer the following questions from the Article belowExercise #1..pdf
 
All answers are in the form of TrueFalse with a explantion as to wh.pdf
All answers are in the form of TrueFalse with a explantion as to wh.pdfAll answers are in the form of TrueFalse with a explantion as to wh.pdf
All answers are in the form of TrueFalse with a explantion as to wh.pdf
 
Consider miRNA target sites, How do these compare to transcription fa.pdf
Consider miRNA target sites, How do these compare to transcription fa.pdfConsider miRNA target sites, How do these compare to transcription fa.pdf
Consider miRNA target sites, How do these compare to transcription fa.pdf
 
Anaerobic Respiration & Fermentation (Microbiology)What are the bu.pdf
Anaerobic Respiration & Fermentation (Microbiology)What are the bu.pdfAnaerobic Respiration & Fermentation (Microbiology)What are the bu.pdf
Anaerobic Respiration & Fermentation (Microbiology)What are the bu.pdf
 

Recently uploaded

How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 

Recently uploaded (20)

How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 

What is Database NormalizationExplain the guidelines for ensuring t.pdf

  • 1. What is Database Normalization?Explain the guidelines for ensuring that database are normalized. Solution Here is the answer for your respective question on database normalization: Before going to know about database normalization we should know about database. So what is a database? Its like a repository where all the data related to a particular organization are stored inside the tables in the form of columns and rows which can be related to the employees working in that organization or about the finacial and accounts of the company etc. While storing data into the tables there might be some problems like duplicate entries of the same record related to a particular person which creates a problem named data redundancy in the database. So to avoid this there's been introduced a concept named Normalization. So what is Database Normalization? Database normalization or simply called normalization, is the process of arranging or organizing the columns and tables of a relational database to reduce data redundancy and improve data integrity and efficiency of data stored. Normalization arranges attributes in tables based on dependencies between attributes, ensuring that the dependencies are properly enforced by database integrity constraints. Normalization can be achieved by applying some formal rules like synthesis or decomposition. To come to the types of normalizations there are many.Some of them are as follows: 1NF - First Normal Form 2NF - Second Normal Form 3NF - Third Normal Form BCNF - Boyce–Codd Normal Form 4NF - Fourth Normal Form Basic guidelines for normalization: 1NF - First Normal Form: As per First Normal Form, no two Rows of data must contain repeating group of information. Each table should be organized into rows and each row should have a primary key that distinguishes it as unique.
  • 2. Example for 1NF: Student Age Subject Andrea 15 Zoology Andrea 15 Social Studies Alan 14 Maths Stuart 17 Maths But by 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. 2NF - Second Normal Form: There must not be any partial dependency of any column on primary key. Meaning that for a table that has concatenated primary key, each column in the table that is not part of the primary key must depend upon the entire concatenated key for its existence,failing which the table fails Second normal form. Example: Student Age Andrea 15 Alex 14 Stuart 17 Here we should maintain a separate table for the value subject by doing which we can reduce data redundancy which is lacking in 1NF. In the above table,candidate key will be Student column, because all other column i.e Age is dependent on it. 3NF - Third Normal Form: Third normal form (3NF) is a database principle that allows you to properly arrange our tables by building upon the database normalization principles provided by 1NF and 2NF. There are two basic requirements for a database to be in third normal form: It should meet the requirements of both 1NF and 2NF Should remove columns that are not fully dependent upon the primary key. For example, in the below table, street name, city, and state are unbreakably bound to the zip code. CREATE TABLE EMPLOYEE( EMP_ID INT NOT NULL, EMP_NAME VARCHAR (20) NOT NULL, STREET VARCHAR(200),
  • 3. CITY VARCHAR(100), STATE VARCHAR(100), ZIP VARCHAR(12), PRIMARY KEY (EMP_ID) ); The dependency between zip code and address in the above shown query is called a transitive dependency. To change it to third normal form(3NF), all we need to do is move the Street, City, and State fields into their own table. CREATE TABLE ADDRESS( ZIP VARCHAR(12), STREET VARCHAR(200), CITY VARCHAR(100), STATE VARCHAR(100), PRIMARY KEY (ZIP) ); Next, alter the EMPLOYEE table as follows: CREATE TABLE EMPLOYEE( EMP_ID INT NOT NULL, EMP_NAME VARCHAR (20) NOT NULL, ZIP VARCHAR(12), PRIMARY KEY (EMP_ID) ); The advantage of removing transitive dependency is, 1.Amount of data duplication is reduced. 2.Data integrity achieved. BCNF - Boyce–Codd Normal Form: This form deals with certain type of anamolies that are not handled by 3NF. A 3NF table which does not have multiple overlapping candidate keys is said to be in BCNF. Following conditions must be satisfied: R must be in 3rd Normal Form and, for each functional dependency ( X -> Y ), X should be a super Key. 4NF - Fourth Normal Form : It should meet all the requirements of 3NF Attribute of one or more rows in the table should not result in more than one rows of the same table leading to multi-valued
  • 4. dependencies. Here is the answer for your respective question on database normalization: Before going to know about database normalization we should know about database. So what is a database? Its like a repository where all the data related to a particular organization are stored inside the tables in the form of columns and rows which can be related to the employees working in that organization or about the finacial and accounts of the company etc. While storing data into the tables there might be some problems like duplicate entries of the same record related to a particular person which creates a problem named data redundancy in the database. So to avoid this there's been introduced a concept named Normalization. So what is Database Normalization? Database normalization or simply called normalization, is the process of arranging or organizing the columns and tables of a relational database to reduce data redundancy and improve data integrity and efficiency of data stored. Normalization arranges attributes in tables based on dependencies between attributes, ensuring that the dependencies are properly enforced by database integrity constraints. Normalization can be achieved by applying some formal rules like synthesis or decomposition. To come to the types of normalizations there are many.Some of them are as follows: 1NF - First Normal Form 2NF - Second Normal Form 3NF - Third Normal Form BCNF - Boyce–Codd Normal Form 4NF - Fourth Normal Form Basic guidelines for normalization: 1NF - First Normal Form: As per First Normal Form, no two Rows of data must contain repeating group of information. Each table should be organized into rows and each row should have a primary key that distinguishes it as unique. Example for 1NF: Student Age Subject Andrea 15 Zoology Andrea 15 Social Studies Alan 14 Maths
  • 5. Stuart 17 Maths But by 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. 2NF - Second Normal Form: There must not be any partial dependency of any column on primary key. Meaning that for a table that has concatenated primary key, each column in the table that is not part of the primary key must depend upon the entire concatenated key for its existence,failing which the table fails Second normal form. Example: Student Age Andrea 15 Alex 14 Stuart 17 Here we should maintain a separate table for the value subject by doing which we can reduce data redundancy which is lacking in 1NF. In the above table,candidate key will be Student column, because all other column i.e Age is dependent on it. 3NF - Third Normal Form: Third normal form (3NF) is a database principle that allows you to properly arrange our tables by building upon the database normalization principles provided by 1NF and 2NF. There are two basic requirements for a database to be in third normal form: It should meet the requirements of both 1NF and 2NF Should remove columns that are not fully dependent upon the primary key. For example, in the below table, street name, city, and state are unbreakably bound to the zip code. CREATE TABLE EMPLOYEE( EMP_ID INT NOT NULL, EMP_NAME VARCHAR (20) NOT NULL, STREET VARCHAR(200), CITY VARCHAR(100), STATE VARCHAR(100), ZIP VARCHAR(12), PRIMARY KEY (EMP_ID) );
  • 6. The dependency between zip code and address in the above shown query is called a transitive dependency. To change it to third normal form(3NF), all we need to do is move the Street, City, and State fields into their own table. CREATE TABLE ADDRESS( ZIP VARCHAR(12), STREET VARCHAR(200), CITY VARCHAR(100), STATE VARCHAR(100), PRIMARY KEY (ZIP) ); Next, alter the EMPLOYEE table as follows: CREATE TABLE EMPLOYEE( EMP_ID INT NOT NULL, EMP_NAME VARCHAR (20) NOT NULL, ZIP VARCHAR(12), PRIMARY KEY (EMP_ID) ); The advantage of removing transitive dependency is, 1.Amount of data duplication is reduced. 2.Data integrity achieved. BCNF - Boyce–Codd Normal Form: This form deals with certain type of anamolies that are not handled by 3NF. A 3NF table which does not have multiple overlapping candidate keys is said to be in BCNF. Following conditions must be satisfied: R must be in 3rd Normal Form and, for each functional dependency ( X -> Y ), X should be a super Key. 4NF - Fourth Normal Form : It should meet all the requirements of 3NF Attribute of one or more rows in the table should not result in more than one rows of the same table leading to multi-valued dependencies.