SlideShare a Scribd company logo
1 of 26
Normalization
Normalization is a process which mainly tries to remove redundancy .
Redundancy occurs when we try to put all the information in single table .
Redundancy is the root cause of number of problems like insertion problem , deletion
problem , update problem .
Redundancy --student(s_id ,name , branch_id , br_name ,H OD name , HOD mail)
There is redundancy in this table because branch information is replicated in each tuple .
Process of replacing a relational schema by a set of relational schemas to achieve a
particular normal form is called normalization.
S_id name Branch_id Br__name HOD
name
HOD mail
1 gg1 101 IT Gaurav gg@.com
2 Gg2 101 IT Gaurav gg@.com
3 Gg3 101 IT Gaurav gg@.com
4 gg4 101 IT Gaurav gg@.com
Due to replication of data in student relation , there is insertion , deletion & updation
problem. For removing all these problems , it is necessary that we have to put data for
each entity in separate table .
In this example student and branch are two separate entities .
So for removing redundancy we have to put student details and branch details in
different tables .
Divide the student relation in two separate relations as student and branch . In this
way we can remove redundancy problems .
In this way we can easily remove repetition problem , data lost problem and
inconsistency problem .
,S_id name Branch_id
1 gg1 101
2 Gg2 101
3 Gg3 101
4 Gg4 101
Branch_id Br_name HOD name HOD mail
101 IT gaurav gg@.com
Student (s_id,name,branch_id)
Branch(branch_id,br_name,HODname,HODmail)
There may be some problems due to bad relational schema , for
removing these problems we decompose the relation . but to
decide whether designed schema is good or whether it should
be decomposed into smaller relations we need some guidance
and normal form provides such guidance.
In short, normal forms provides guidance for designing good
relational schema .
The normal forms based on functional dependencies are first
normal form , second normal form , third normal form & boyce
codd normal form (bcnf).
Every relation in BCNF is restricted to be in 3 NF.
Every relation in 3 NF is restricted to be in 2 NF.
Every relation in 2 NF is restricted to be in 1 NF
4NF & 5NF are also used for better schema design.
4NF is known as PROJECT JOIN NORMAL FORM .
5 NF is known as DOMAIN KEY NORMAL FORM .
Generally while designing a relational schema we always try to achieve
highest normal form , which is possible by normalization.
Dependency
based
a relation in BCNF, is also
in 3NF
a relation in 3NF is also in
2NF
a relation in 2NF is also in
1NF
Process of replacing a relational schema by a set of relational
schemas to achieve a particular normal form is called
normalization.
The process of normalization is based on schema decomposition
and functional dependencies.
Unnormalized relation
A relation having multiple values in a column or attribute of a
row is called an unnormalized relation .
Roll_NO name course
101 gg1 C
OS
102 gg2 DBMS
LINUX
1 Normal form
1 normal form allows only atomic values in the domain of any
attribute.
Eg- student(roll_no , name , course)
Roll_ no name Course
101 Gg1 C
101 Gg1 Os
102 Gg2 Linux
102 gg2 DBMS
Relation is in 1 NF.
2 NORMAL FORM
Second normal form is based on the concept of full functional
dependency . In second normal form we have to remove partial
dependency . A functional dependency x->y is full functional
dependency if no proper subset of x like z is there such that
holds . Such functional dependencies are left reduced as there is
no extraneous attribute in the left hand side of dependency .
Full dependency-
When non prime attribute completely depends on candidate key then it is known as
full dependency.
Partial dependency-
When non prime attribute does not depend completely on candidate key , it depends
only on a part of candidate key is known as partial dependency.
Extraneous attribute-
An attribute of an functional dependency is extraneous if we can remove it without
changing the closure of the set of fdโ€™s .
Example-
If set of functional dependency {a->bc , a->c} ,in functional dependency a->bc , c is
extraneous attribute because after removing c from functional dependencies new set
of functional dependencies will be {a->b , a->c} and we can observe f+ = fโ€™+ .
Candidate key
Candidate keys are the subset of super keys. A super key with no redundant
attribute is known as Candidate Key.
Every table must have at least one candidate key but at the same time can
have more than one candidate key .
We are concerned about those super keys for which no proper subset is a
super key. Such minimal super keys are called candidate keys.
How to get candidate keys from given functional dependencies โ€“
1. Draw rough diagram for every functional dependency .
2. Check incoming and outgoing edges on each attribute.
3. Select all the attributes which does not have any incoming edge.
4. Combine all attributes and calculate closure .
5. If these attributes are able to calculate complete set of attributes then
it is a candidate key .
6. It is possible that there may be more than one candidate key .
7. All the attributes which take part in any of candidate key are prime
attributes.
Example of candidate key
Given R(ABCDE)
Functional dependencies { BC->ADE
D->B}
Find candidate keys for given functional dependencies
Solution-
a b c d e
There is no incoming edge on c so c is essentially a part of candidate key .
But c is not able to calculate complete set of attributes so try to find set of candidate kays
Bc={bcade}
cd={cdbea}
So in this case bc & cd are candidate keys.
Bcd are prime attributes and ae is non prime attributes.
In this way we can find all possible candidate keys .
Eg- R(a,b,c,d) and there are two functional dependencies{ab->d,
b->c} check it is in second normal form or not? If relation is not in 2 NF
convert in 2NF.
Solution โ€“ 1. find candidate key for R(a,b,c,d) fdโ€™s {Ab->c,B->c}
a b c d
There is no incoming edge
on a , b so both are parts
of candidate keys.
Closure of (ab)+ = {abdc}
By using ab we can find all other
attributes so ab is a candidate key.
If ab is candidate key then {a,b} are prime attributes and {c, d} are non
prime attributes.
Values of non prime attributes can be find by using prime attributes.
In this case there is only candidate key so it is primary key also.
To find value of d we have to know values of a & b both so there is no
problem because d is completely dependent on candidate key.
But in b->c , c is a non prime attribute and it is not completely
dependent on candidate key . so there is partial dependency
From definition of 2 NF , table must be independent of partial
dependency.
But b->c has partial dependency .
So R is not in 2 NF.
How to convert schema in 2 NF
Decompose table in two tables R1,R2
In first table put the prime attributes and non prime attributes which
are entirely dependent on candidate key.
R1(a,b,d)
In second table put the part of candidate key which can independently
find the value of non prime attribute & non prime attribute which is
dependent on that .
R2(b,c)
(in R2 (b,c) b is a part of candidate key which independently can
compute value of c . Now partial dependency removed as b become
primary key in R2) .
Now r(a,b,c,d) is converted in 2 NF.
3 NF
Third normal form is based on the concept of transitive functional
dependency . If in a relation R x->y and y-> z holds then x->z also
holds and z is called to be transitively dependent on x .
A relation schema R is in 3 NF if it is In 2 NF and if no non prime
attribute of R is transitively dependent on the candidate key of the
relation .
In 3 NF for all non trivial functional dependencies on R x->a either x
is candidate key of R or a is a prime attribute . Hence third normal
form eliminates dependency of a non prime attribute to another
non prime attribute.
Example โ€“
Given R(a , b , c , d)
Functional dependencies {ab->c
c->d}
Check whether it is in 3 Normal form or not .
Solution โ€“
Calculate candidate key
ab is considered as a candidate key from given dependencies .
Because we can get all other attributes of relation from ab
(ab)+ = {abcd}
So a,b are prime attributes.
c,d are non prime attributes .
As we know that if we wants to be in 3 NF then relation have to be In 2 NF .
Check from given dependencies that either table is in 2 NF or not .
From ab->c we can conclude that a non prime attribute c is fully dependent on
candidate key , there is no partial dependency .
C->d a non prime attribute depends on another non prime attribute which is also
allowed in 2 NF so given relation is in 2 NF.
But there is a problem that a non prime attribute is finding
another non prime attribute which is a case of transitive
dependency .
Transitive dependency is not allowed in 3 NF .
In short , a table is in 3 NF if there is no partial and transitive
dependency .
So this table is not in 3 Normal form.
How to convert relation In 3 NF
Decompose the given relation R in R1 and R2.
In first relation put candidate key and fully dependent attributes .
As R1(a , b , c). ab is candidate key and c is fully dependent on
candidate key .
In second relation put R2(c , d) now c become a key and prime
attribute so it can not be null and our issue is solved . In every
situation c is able to find d .
BCNF
BCMF is more strong than 3 NF and for most of the database
applications , ultimate goal of schema refinement is BCNF .
A relation R is in BCNF if for every non trivial functional
dependency in the closure of the set of functional dependencies
F on R , i.e. of form x->a , x is super key of R .
A relation schema is in BCNF if it in 3 NF and determinant of
dependency is super key .
Effectively , 3 NF allows non trivial fdโ€™s whose determinant is not
a super key if the right hand side of dependency is is part of
candidate key , but in BCNF , an fd is allowed only if the
determinant is a super key of relation .
Example โ€“ consider given relation R(a , b , c)
functional dependency{ab->c
c->b}
check is it in BCNF or not ?
Solution-
Candidate key of Relation R โ€“ ab , ac
(ab)+ = {abc}
(ac)+ ={abc}
First check for 2 NF-
The relation is in 2NF because
In 1 dependency there is no partial dependency .
In 2 dependency c is a part of candidate key but b is prime
attribute. So there is not partial dependency .so relation is in 2
NF.
For 3 NF check for transitive dependency
As we know , transitive dependency is for non prime to non
prime .
In both dependencies there is only prime attributes so there is
no transitive dependency
Table is also in 3 NF.
Now for BCNF given dependency determinant should be super
key
From 1 dependency ab is super key but in second dependency c
is not a super key so this is not eligible for BCNF.
Note โ€“
1. x->y
X is super key then relation is in BCNF .
2. x->y
If y is prime or x is candidate key then always relation will be in 3 NF
3. x->y
If y is fully dependent on x then always relation will be in 2NF .
Objective -R(ABCDEFGH)
Functional dependency F
{AB->C
A->DE
B->F
F->GH }
Check normal form for given schema .
Solution โ€“
Candidate key for relation - AB
1 check for BCNF
In 1 dependency AB is a super key or candidate key so it satisfies the condition but in 2 dependency A is
not a key so we can conclude that given relation is not in BCNF.
2 check for 3 NF
In 1 dependency AB is a key so it satisfies the condition but in second dependency neither A is a super or
candidate key nor DE is prime attribute so we can conclude that given relation is not in 3 NF .
3 check for 2 NF
In 1 dependency C is a non prime attribute which is fully dependent on candidate key so it satisfies the
condition but in 2 dependency DE are partially dependent on A . So we can conclude that given relation is
not in 2 NF .
Now we can conclude that relation is in 1 NORMAL FORM .
Given R(ABCDEFGHIJ)
F={AB->C
A->DE
B->F
D->IJ
F->GH}
Convert this form in 2 NF , 3 NF & BCNF.
Solution- for 2 NORMAL FORM
Find candidate key for given relation R
AB is candidate key because (AB)+ ={ABCDEFGHIJ}
Decompose R in R1 , R2 , R3 for converting in 2 NF
R1(ABC)
R2(ADEIJ)
R3(BFGH)
Now there is no partial dependency and schema is in 2 NORMAL FORM
For 3 NORMAL FORM
In converted schema there is no partial dependency but transitive
dependency occurs .
for removing transitive dependency decompose R2 and R3 further.
R2 is decomposed in R4 &R5.
R3 is decomposed in R6 & R7.
now R4 (ADE)
R5(DIJ)
R6(BF)
R7(FGH)
Complete relation
R1(ABC)
R4(ADE)
R5(DIJ)
R6(BF)
R7(FGH)
RELATION IS CONVERTED IN 3NF.

More Related Content

What's hot

Functional dependency and normalization
Functional dependency and normalizationFunctional dependency and normalization
Functional dependency and normalizationUniversity of Potsdam
ย 
DBMS Canonical cover
DBMS Canonical coverDBMS Canonical cover
DBMS Canonical coverSaurabh Tandel
ย 
Normalization
NormalizationNormalization
NormalizationWangu Thupa
ย 
Databases: Normalisation
Databases: NormalisationDatabases: Normalisation
Databases: NormalisationDamian T. Gordon
ย 
Functional dependencies and normalization
Functional dependencies and normalizationFunctional dependencies and normalization
Functional dependencies and normalizationdaxesh chauhan
ย 
Dependency preservation
Dependency preservationDependency preservation
Dependency preservationMANASYJAYASURYA
ย 
Functional dependancy
Functional dependancyFunctional dependancy
Functional dependancyVisakh V
ย 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMSPrateek Parimal
ย 
Normalization
NormalizationNormalization
Normalizationmeet darji
ย 
Database Normalization
Database NormalizationDatabase Normalization
Database NormalizationArun Sharma
ย 
Indexing and Hashing
Indexing and HashingIndexing and Hashing
Indexing and Hashingsathish sak
ย 
File organization 1
File organization 1File organization 1
File organization 1Rupali Rana
ย 
ER model to Relational model mapping
ER model to Relational model mappingER model to Relational model mapping
ER model to Relational model mappingShubham Saini
ย 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLEVraj Patel
ย 
Functional dependency and normalization
Functional dependency and normalizationFunctional dependency and normalization
Functional dependency and normalizationVisakh V
ย 
Decomposition using Functional Dependency
Decomposition using Functional DependencyDecomposition using Functional Dependency
Decomposition using Functional DependencyRaj Naik
ย 

What's hot (20)

Functional dependency and normalization
Functional dependency and normalizationFunctional dependency and normalization
Functional dependency and normalization
ย 
Normal forms
Normal formsNormal forms
Normal forms
ย 
DBMS Canonical cover
DBMS Canonical coverDBMS Canonical cover
DBMS Canonical cover
ย 
Normalization
NormalizationNormalization
Normalization
ย 
Databases: Normalisation
Databases: NormalisationDatabases: Normalisation
Databases: Normalisation
ย 
Functional dependencies and normalization
Functional dependencies and normalizationFunctional dependencies and normalization
Functional dependencies and normalization
ย 
Dependency preservation
Dependency preservationDependency preservation
Dependency preservation
ย 
Functional dependancy
Functional dependancyFunctional dependancy
Functional dependancy
ย 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
ย 
Functional dependency
Functional dependencyFunctional dependency
Functional dependency
ย 
Normalization
NormalizationNormalization
Normalization
ย 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
ย 
Indexing and Hashing
Indexing and HashingIndexing and Hashing
Indexing and Hashing
ย 
File organization 1
File organization 1File organization 1
File organization 1
ย 
ER model to Relational model mapping
ER model to Relational model mappingER model to Relational model mapping
ER model to Relational model mapping
ย 
Normalisation
NormalisationNormalisation
Normalisation
ย 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
ย 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
ย 
Functional dependency and normalization
Functional dependency and normalizationFunctional dependency and normalization
Functional dependency and normalization
ย 
Decomposition using Functional Dependency
Decomposition using Functional DependencyDecomposition using Functional Dependency
Decomposition using Functional Dependency
ย 

Similar to Normalization

Normalization
NormalizationNormalization
NormalizationSanSan149
ย 
24042020_normalization 1.pdf
24042020_normalization 1.pdf24042020_normalization 1.pdf
24042020_normalization 1.pdfShivani139202
ย 
Database normalization
Database normalizationDatabase normalization
Database normalizationVARSHAKUMARI49
ย 
functional dependency in engineering.pptx
functional dependency in engineering.pptxfunctional dependency in engineering.pptx
functional dependency in engineering.pptxamanchouhan9917
ย 
Chapter โ€“ 4 Normalization and Relational Algebra.pdf
Chapter โ€“ 4 Normalization and Relational Algebra.pdfChapter โ€“ 4 Normalization and Relational Algebra.pdf
Chapter โ€“ 4 Normalization and Relational Algebra.pdfTamiratDejene1
ย 
DBMS-Normalization.ppt
DBMS-Normalization.pptDBMS-Normalization.ppt
DBMS-Normalization.pptKalpanaThakre2
ย 
L9 design2
L9 design2L9 design2
L9 design2Tianlu Wang
ย 
Normalization
NormalizationNormalization
NormalizationMohd Mastana
ย 
DBMS Helping material
DBMS Helping materialDBMS Helping material
DBMS Helping materialZarlishAttique1
ย 
Lecture No. 21-22.ppt
Lecture No. 21-22.pptLecture No. 21-22.ppt
Lecture No. 21-22.pptAjit Mali
ย 
Top schools in india
Top schools in indiaTop schools in india
Top schools in indiaEdhole.com
ย 
Database management system session 5
Database management system session 5Database management system session 5
Database management system session 5Infinity Tech Solutions
ย 
Normalization
NormalizationNormalization
Normalizationrehanlko007
ย 
L8 design1
L8 design1L8 design1
L8 design1Tianlu Wang
ย 
Normmmalizzarion.ppt
Normmmalizzarion.pptNormmmalizzarion.ppt
Normmmalizzarion.pptDeependra35
ย 
ALGORITHM FOR RELATIONAL DATABASE NORMALIZATION UP TO 3NF
ALGORITHM FOR RELATIONAL DATABASE NORMALIZATION UP TO 3NFALGORITHM FOR RELATIONAL DATABASE NORMALIZATION UP TO 3NF
ALGORITHM FOR RELATIONAL DATABASE NORMALIZATION UP TO 3NFijdms
ย 

Similar to Normalization (20)

Normalization
NormalizationNormalization
Normalization
ย 
Normalization
NormalizationNormalization
Normalization
ย 
24042020_normalization 1.pdf
24042020_normalization 1.pdf24042020_normalization 1.pdf
24042020_normalization 1.pdf
ย 
Database normalization
Database normalizationDatabase normalization
Database normalization
ย 
functional dependency in engineering.pptx
functional dependency in engineering.pptxfunctional dependency in engineering.pptx
functional dependency in engineering.pptx
ย 
Normal forms.ppt
Normal forms.pptNormal forms.ppt
Normal forms.ppt
ย 
Chapter โ€“ 4 Normalization and Relational Algebra.pdf
Chapter โ€“ 4 Normalization and Relational Algebra.pdfChapter โ€“ 4 Normalization and Relational Algebra.pdf
Chapter โ€“ 4 Normalization and Relational Algebra.pdf
ย 
DBMS-Normalization.ppt
DBMS-Normalization.pptDBMS-Normalization.ppt
DBMS-Normalization.ppt
ย 
L9 design2
L9 design2L9 design2
L9 design2
ย 
Normalization
NormalizationNormalization
Normalization
ย 
DBMS Helping material
DBMS Helping materialDBMS Helping material
DBMS Helping material
ย 
Lecture No. 21-22.ppt
Lecture No. 21-22.pptLecture No. 21-22.ppt
Lecture No. 21-22.ppt
ย 
Top schools in india
Top schools in indiaTop schools in india
Top schools in india
ย 
Database management system session 5
Database management system session 5Database management system session 5
Database management system session 5
ย 
Normalization
NormalizationNormalization
Normalization
ย 
L8 design1
L8 design1L8 design1
L8 design1
ย 
UNIT 2 -PPT.pptx
UNIT 2 -PPT.pptxUNIT 2 -PPT.pptx
UNIT 2 -PPT.pptx
ย 
Normmmalizzarion.ppt
Normmmalizzarion.pptNormmmalizzarion.ppt
Normmmalizzarion.ppt
ย 
Normalization1
Normalization1Normalization1
Normalization1
ย 
ALGORITHM FOR RELATIONAL DATABASE NORMALIZATION UP TO 3NF
ALGORITHM FOR RELATIONAL DATABASE NORMALIZATION UP TO 3NFALGORITHM FOR RELATIONAL DATABASE NORMALIZATION UP TO 3NF
ALGORITHM FOR RELATIONAL DATABASE NORMALIZATION UP TO 3NF
ย 

Recently uploaded

Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
ย 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
ย 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
ย 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfRagavanV2
ย 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
ย 
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar โ‰ผ๐Ÿ” Delhi door step de...
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar  โ‰ผ๐Ÿ” Delhi door step de...Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar  โ‰ผ๐Ÿ” Delhi door step de...
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar โ‰ผ๐Ÿ” Delhi door step de...9953056974 Low Rate Call Girls In Saket, Delhi NCR
ย 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
ย 
Top Rated Call Girls In chittoor ๐Ÿ“ฑ {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor ๐Ÿ“ฑ {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor ๐Ÿ“ฑ {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor ๐Ÿ“ฑ {7001035870} VIP Escorts chittoordharasingh5698
ย 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsArindam Chakraborty, Ph.D., P.E. (CA, TX)
ย 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
ย 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
ย 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
ย 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityMorshed Ahmed Rahath
ย 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
ย 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
ย 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
ย 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
ย 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
ย 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf203318pmpc
ย 

Recently uploaded (20)

Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
ย 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
ย 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
ย 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
ย 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
ย 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
ย 
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar โ‰ผ๐Ÿ” Delhi door step de...
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar  โ‰ผ๐Ÿ” Delhi door step de...Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar  โ‰ผ๐Ÿ” Delhi door step de...
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar โ‰ผ๐Ÿ” Delhi door step de...
ย 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
ย 
Top Rated Call Girls In chittoor ๐Ÿ“ฑ {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor ๐Ÿ“ฑ {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor ๐Ÿ“ฑ {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor ๐Ÿ“ฑ {7001035870} VIP Escorts chittoor
ย 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
ย 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
ย 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
ย 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
ย 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
ย 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
ย 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
ย 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
ย 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
ย 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
ย 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf
ย 

Normalization

  • 1. Normalization Normalization is a process which mainly tries to remove redundancy . Redundancy occurs when we try to put all the information in single table . Redundancy is the root cause of number of problems like insertion problem , deletion problem , update problem . Redundancy --student(s_id ,name , branch_id , br_name ,H OD name , HOD mail) There is redundancy in this table because branch information is replicated in each tuple . Process of replacing a relational schema by a set of relational schemas to achieve a particular normal form is called normalization. S_id name Branch_id Br__name HOD name HOD mail 1 gg1 101 IT Gaurav gg@.com 2 Gg2 101 IT Gaurav gg@.com 3 Gg3 101 IT Gaurav gg@.com 4 gg4 101 IT Gaurav gg@.com
  • 2. Due to replication of data in student relation , there is insertion , deletion & updation problem. For removing all these problems , it is necessary that we have to put data for each entity in separate table . In this example student and branch are two separate entities . So for removing redundancy we have to put student details and branch details in different tables . Divide the student relation in two separate relations as student and branch . In this way we can remove redundancy problems . In this way we can easily remove repetition problem , data lost problem and inconsistency problem . ,S_id name Branch_id 1 gg1 101 2 Gg2 101 3 Gg3 101 4 Gg4 101 Branch_id Br_name HOD name HOD mail 101 IT gaurav gg@.com Student (s_id,name,branch_id) Branch(branch_id,br_name,HODname,HODmail)
  • 3. There may be some problems due to bad relational schema , for removing these problems we decompose the relation . but to decide whether designed schema is good or whether it should be decomposed into smaller relations we need some guidance and normal form provides such guidance. In short, normal forms provides guidance for designing good relational schema . The normal forms based on functional dependencies are first normal form , second normal form , third normal form & boyce codd normal form (bcnf).
  • 4. Every relation in BCNF is restricted to be in 3 NF. Every relation in 3 NF is restricted to be in 2 NF. Every relation in 2 NF is restricted to be in 1 NF 4NF & 5NF are also used for better schema design. 4NF is known as PROJECT JOIN NORMAL FORM . 5 NF is known as DOMAIN KEY NORMAL FORM . Generally while designing a relational schema we always try to achieve highest normal form , which is possible by normalization. Dependency based
  • 5. a relation in BCNF, is also in 3NF a relation in 3NF is also in 2NF a relation in 2NF is also in 1NF
  • 6. Process of replacing a relational schema by a set of relational schemas to achieve a particular normal form is called normalization. The process of normalization is based on schema decomposition and functional dependencies.
  • 7. Unnormalized relation A relation having multiple values in a column or attribute of a row is called an unnormalized relation . Roll_NO name course 101 gg1 C OS 102 gg2 DBMS LINUX
  • 8. 1 Normal form 1 normal form allows only atomic values in the domain of any attribute. Eg- student(roll_no , name , course) Roll_ no name Course 101 Gg1 C 101 Gg1 Os 102 Gg2 Linux 102 gg2 DBMS Relation is in 1 NF.
  • 9. 2 NORMAL FORM Second normal form is based on the concept of full functional dependency . In second normal form we have to remove partial dependency . A functional dependency x->y is full functional dependency if no proper subset of x like z is there such that holds . Such functional dependencies are left reduced as there is no extraneous attribute in the left hand side of dependency .
  • 10. Full dependency- When non prime attribute completely depends on candidate key then it is known as full dependency. Partial dependency- When non prime attribute does not depend completely on candidate key , it depends only on a part of candidate key is known as partial dependency. Extraneous attribute- An attribute of an functional dependency is extraneous if we can remove it without changing the closure of the set of fdโ€™s . Example- If set of functional dependency {a->bc , a->c} ,in functional dependency a->bc , c is extraneous attribute because after removing c from functional dependencies new set of functional dependencies will be {a->b , a->c} and we can observe f+ = fโ€™+ .
  • 11. Candidate key Candidate keys are the subset of super keys. A super key with no redundant attribute is known as Candidate Key. Every table must have at least one candidate key but at the same time can have more than one candidate key . We are concerned about those super keys for which no proper subset is a super key. Such minimal super keys are called candidate keys. How to get candidate keys from given functional dependencies โ€“ 1. Draw rough diagram for every functional dependency . 2. Check incoming and outgoing edges on each attribute. 3. Select all the attributes which does not have any incoming edge. 4. Combine all attributes and calculate closure . 5. If these attributes are able to calculate complete set of attributes then it is a candidate key . 6. It is possible that there may be more than one candidate key . 7. All the attributes which take part in any of candidate key are prime attributes.
  • 12. Example of candidate key Given R(ABCDE) Functional dependencies { BC->ADE D->B} Find candidate keys for given functional dependencies Solution- a b c d e There is no incoming edge on c so c is essentially a part of candidate key . But c is not able to calculate complete set of attributes so try to find set of candidate kays Bc={bcade} cd={cdbea} So in this case bc & cd are candidate keys. Bcd are prime attributes and ae is non prime attributes. In this way we can find all possible candidate keys .
  • 13. Eg- R(a,b,c,d) and there are two functional dependencies{ab->d, b->c} check it is in second normal form or not? If relation is not in 2 NF convert in 2NF. Solution โ€“ 1. find candidate key for R(a,b,c,d) fdโ€™s {Ab->c,B->c} a b c d There is no incoming edge on a , b so both are parts of candidate keys. Closure of (ab)+ = {abdc} By using ab we can find all other attributes so ab is a candidate key.
  • 14. If ab is candidate key then {a,b} are prime attributes and {c, d} are non prime attributes. Values of non prime attributes can be find by using prime attributes. In this case there is only candidate key so it is primary key also. To find value of d we have to know values of a & b both so there is no problem because d is completely dependent on candidate key. But in b->c , c is a non prime attribute and it is not completely dependent on candidate key . so there is partial dependency From definition of 2 NF , table must be independent of partial dependency. But b->c has partial dependency . So R is not in 2 NF.
  • 15. How to convert schema in 2 NF Decompose table in two tables R1,R2 In first table put the prime attributes and non prime attributes which are entirely dependent on candidate key. R1(a,b,d) In second table put the part of candidate key which can independently find the value of non prime attribute & non prime attribute which is dependent on that . R2(b,c) (in R2 (b,c) b is a part of candidate key which independently can compute value of c . Now partial dependency removed as b become primary key in R2) . Now r(a,b,c,d) is converted in 2 NF.
  • 16. 3 NF Third normal form is based on the concept of transitive functional dependency . If in a relation R x->y and y-> z holds then x->z also holds and z is called to be transitively dependent on x . A relation schema R is in 3 NF if it is In 2 NF and if no non prime attribute of R is transitively dependent on the candidate key of the relation . In 3 NF for all non trivial functional dependencies on R x->a either x is candidate key of R or a is a prime attribute . Hence third normal form eliminates dependency of a non prime attribute to another non prime attribute.
  • 17. Example โ€“ Given R(a , b , c , d) Functional dependencies {ab->c c->d} Check whether it is in 3 Normal form or not . Solution โ€“ Calculate candidate key ab is considered as a candidate key from given dependencies . Because we can get all other attributes of relation from ab (ab)+ = {abcd} So a,b are prime attributes. c,d are non prime attributes . As we know that if we wants to be in 3 NF then relation have to be In 2 NF . Check from given dependencies that either table is in 2 NF or not . From ab->c we can conclude that a non prime attribute c is fully dependent on candidate key , there is no partial dependency . C->d a non prime attribute depends on another non prime attribute which is also allowed in 2 NF so given relation is in 2 NF.
  • 18. But there is a problem that a non prime attribute is finding another non prime attribute which is a case of transitive dependency . Transitive dependency is not allowed in 3 NF . In short , a table is in 3 NF if there is no partial and transitive dependency . So this table is not in 3 Normal form.
  • 19. How to convert relation In 3 NF Decompose the given relation R in R1 and R2. In first relation put candidate key and fully dependent attributes . As R1(a , b , c). ab is candidate key and c is fully dependent on candidate key . In second relation put R2(c , d) now c become a key and prime attribute so it can not be null and our issue is solved . In every situation c is able to find d .
  • 20. BCNF BCMF is more strong than 3 NF and for most of the database applications , ultimate goal of schema refinement is BCNF . A relation R is in BCNF if for every non trivial functional dependency in the closure of the set of functional dependencies F on R , i.e. of form x->a , x is super key of R . A relation schema is in BCNF if it in 3 NF and determinant of dependency is super key . Effectively , 3 NF allows non trivial fdโ€™s whose determinant is not a super key if the right hand side of dependency is is part of candidate key , but in BCNF , an fd is allowed only if the determinant is a super key of relation .
  • 21. Example โ€“ consider given relation R(a , b , c) functional dependency{ab->c c->b} check is it in BCNF or not ? Solution- Candidate key of Relation R โ€“ ab , ac (ab)+ = {abc} (ac)+ ={abc} First check for 2 NF- The relation is in 2NF because In 1 dependency there is no partial dependency . In 2 dependency c is a part of candidate key but b is prime attribute. So there is not partial dependency .so relation is in 2 NF.
  • 22. For 3 NF check for transitive dependency As we know , transitive dependency is for non prime to non prime . In both dependencies there is only prime attributes so there is no transitive dependency Table is also in 3 NF. Now for BCNF given dependency determinant should be super key From 1 dependency ab is super key but in second dependency c is not a super key so this is not eligible for BCNF.
  • 23. Note โ€“ 1. x->y X is super key then relation is in BCNF . 2. x->y If y is prime or x is candidate key then always relation will be in 3 NF 3. x->y If y is fully dependent on x then always relation will be in 2NF .
  • 24. Objective -R(ABCDEFGH) Functional dependency F {AB->C A->DE B->F F->GH } Check normal form for given schema . Solution โ€“ Candidate key for relation - AB 1 check for BCNF In 1 dependency AB is a super key or candidate key so it satisfies the condition but in 2 dependency A is not a key so we can conclude that given relation is not in BCNF. 2 check for 3 NF In 1 dependency AB is a key so it satisfies the condition but in second dependency neither A is a super or candidate key nor DE is prime attribute so we can conclude that given relation is not in 3 NF . 3 check for 2 NF In 1 dependency C is a non prime attribute which is fully dependent on candidate key so it satisfies the condition but in 2 dependency DE are partially dependent on A . So we can conclude that given relation is not in 2 NF . Now we can conclude that relation is in 1 NORMAL FORM .
  • 25. Given R(ABCDEFGHIJ) F={AB->C A->DE B->F D->IJ F->GH} Convert this form in 2 NF , 3 NF & BCNF. Solution- for 2 NORMAL FORM Find candidate key for given relation R AB is candidate key because (AB)+ ={ABCDEFGHIJ} Decompose R in R1 , R2 , R3 for converting in 2 NF R1(ABC) R2(ADEIJ) R3(BFGH) Now there is no partial dependency and schema is in 2 NORMAL FORM
  • 26. For 3 NORMAL FORM In converted schema there is no partial dependency but transitive dependency occurs . for removing transitive dependency decompose R2 and R3 further. R2 is decomposed in R4 &R5. R3 is decomposed in R6 & R7. now R4 (ADE) R5(DIJ) R6(BF) R7(FGH) Complete relation R1(ABC) R4(ADE) R5(DIJ) R6(BF) R7(FGH) RELATION IS CONVERTED IN 3NF.