SlideShare une entreprise Scribd logo
1  sur  30
NORMALIZATION
Rajishma T
rajishmatnair@gmail.com
www.facebook.com/
Rajishma T Nair
twitter.com/username
in.linkedin.com/in/profilena
me
9020217968
Disclaimer: This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .
Ltd
NORMALIZATION
 Normalization is the process of removing
potential anomalies from the database design.
These anomalies include:
– Insertion anomalies
– Update anomalies
– Deletion anomalies
INSERTION ANOMALIES
An insertion anomaly occurs when you can’t enter a
record in because some data is missing.
Consider a database with the rule that every
employee must be assigned to a project, but a newly
hired employee doesn’t have a project yet.
One solution is to create a dummy project, but this
puts bad data into your database and is not a good
idea.
UPDATE ANOMALIES
 Update anomalies occur when the same data
is stored in more than one place.
 This means whenever you have to make a
change to the data, you must do it in several
places.
 The more times you have to edit the same
data in multiple places, the more chances you
have of making a mistake, causing inconsistent
data.
DELETION ANOMALIES
causes other data to be lost Deletion anomalies
occur when deleting a record accidently .
 Normalization:
– The process of decomposing unsatisfactory "bad"
relations by breaking up their attributes into
smaller relations
 Normal form:
– Condition using keys and FDs of a relation to
certify whether a relation schema is in a particular
normal form
FIRST NORMAL FORM
 Only attribute values permitted are single atomic (or
indivisible) values
Techniques to achieve first normal form
– Remove attribute and place in separate relation
– Expand the key
– Use several atomic attributes
SECOND NORMAL FORM
 Second Normal Form removes what are called
“functional dependencies.”
 Functional dependencies are groups of columns that
depend on each other rather than on the key of the
table.
 Functional dependencies (FDs)
– Are used to specify formal measures of the
"goodness" of relational designs
– And keys are used to define normal forms for
relations
– Are constraints that are derived from the meaning
and interrelationships of the data attributes
 A set of attributes x functionally depends a set of
attributes Y if the value of X determines a unique
value for Y
 X -> Y holds if whenever two tuples have the
same valuefor X, they must have the same value
for Y
– For any two tuples t1 and t2 in any relation
instance r(R): If t1[X]=t2[X], then t1[Y]=t2[Y]
 X -> Y in R specifies a constraint on all relation
instances r(R)
SECOND NORMAL FORM
 Formal definition of 2NF is a table that is in
1NF and every non-primary-key column is fully
functional dependent on the primary key.
 Full functional dependency indicates that if A
and B are columns of a table, B is fully
dependent on A if B is functionally dependent
on A but not on any proper subset of A.
TRANSITIONAL DEPENDENCY
 Transitive functional dependency: a FD X -> Z that
can be derived from two FDs X -> Y and Y -> Z
 For example, consider a table with A, B, and C.
If B is functional dependent on A and C is
functional dependent on B , then C is
transitively dependent on A via B (provided that
A is not functionally dependent on B or C).
 If a transitive dependency exists on the
primary key, the table is not in 3NF.
`
BCNF
A relation R is in Boyce/Codd N/F (BCNF) if and only if
every determinant is a candidate key. Here, determinant
is a simple attribute or composite attribute on which
some other attributes is fully functionally dependent.
Each normal form is strictly stronger than the previous
one
Every 2NF relation is in 1NF
Every 3NF relation is in 2NF
Every BCNF relation is in 3NF
 There exist relations that are in 3NF but not in BCNF
 The goal is to have each relation in BCNF (or 3NF)
campus course class time Room/bldng
east English 101 1 8:00-9:00 212 AYE
east English 101
2 10:00-11:00 305 RFK
West
English 101 3 8:00-9:00
102 PPR
• no two buildings on any of the university campuses
have the same name, thus ROOM/BLDG-----
>CAMPUS. As the determinant is not a candidate key
this table is not in bcnf.
• R1(course, class, room/bldg, time)
•
course class time Room/bldng
English 101 1 8:00-9:00 212 AYE
English 101 2 10:00-11:00 305RFK
English 101 3 8:00-9:00 102PPR
• R2(room/bldg, campus)
campus Room/bldng
east 212 AYE
east 305 RFK
west 102 PPR
Identify all candidate keys in the relation.
Identify all functional dependencies in the
relation.
If functional dependencies exists in the relation
where their determinants are not candidate keys for
the relation, remove the functional dependencies by
placing them in a new relation along with a copy of
their determinant.
FOURTH NORMAL FORM
4NF: A relation that is in Boyce-Codd Normal
Form and contains no MVDs.
BCNF to 4NF involves the removal of the MVD
from the relation by placing the attribute(s) in a
new relation along with a copy of the
determinant
MVD multi-valued dependency
• Represents a dependency between attributes
(for example, A, B, and C) in a relation, such that
for each value of A there is a set of values for B,
and a set of values for C. However, the set of
values for B and C are independent of each
other
50
Normalization
BCNF to 4NF Relations
If this presentation helped you, please visit our
page facebook.com/baabtra and like it.
Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baabte.com
Contact Us
Emarald Mall (Big Bazar Building)
Mavoor Road, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
NC Complex, Near Bus Stand
Mukkam, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
Start up Village
Eranakulam,
Kerala, India.
Email: info@baabtra.com

Contenu connexe

Tendances

Database normalization
Database normalizationDatabase normalization
Database normalizationJignesh Jain
 
Database normalization
Database normalizationDatabase normalization
Database normalizationEdward Blurock
 
Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Oum Saokosal
 
Normalization 1 nf,2nf,3nf,bcnf
Normalization 1 nf,2nf,3nf,bcnf Normalization 1 nf,2nf,3nf,bcnf
Normalization 1 nf,2nf,3nf,bcnf Shriya agrawal
 
Relational database
Relational  databaseRelational  database
Relational databaseamkrisha
 
Database Normalisation
Database NormalisationDatabase Normalisation
Database NormalisationAmin Omi
 
Chapter 2 Relational Data Model-part 2
Chapter 2 Relational Data Model-part 2Chapter 2 Relational Data Model-part 2
Chapter 2 Relational Data Model-part 2Eddyzulham Mahluzydde
 
Database - Normalization
Database - NormalizationDatabase - Normalization
Database - NormalizationMudasir Qazi
 
Lecture8 Normalization Aggarwal
Lecture8 Normalization AggarwalLecture8 Normalization Aggarwal
Lecture8 Normalization Aggarwalanerudhbalaji
 
functional dependencies with example
functional dependencies with examplefunctional dependencies with example
functional dependencies with exampleSiddhi Viradiya
 
Chuẩn hóa CSDL
Chuẩn hóa CSDLChuẩn hóa CSDL
Chuẩn hóa CSDLphananhvu
 
Database Management System( Normalization)
Database Management System( Normalization)Database Management System( Normalization)
Database Management System( Normalization)kiran Patel
 

Tendances (20)

Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Computer Scinece:RDBMS :Normalisation
Computer Scinece:RDBMS :NormalisationComputer Scinece:RDBMS :Normalisation
Computer Scinece:RDBMS :Normalisation
 
Database normalization
Database normalizationDatabase normalization
Database normalization
 
Database normalization
Database normalizationDatabase normalization
Database normalization
 
Normalization
NormalizationNormalization
Normalization
 
Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)
 
Databases: Normalisation
Databases: NormalisationDatabases: Normalisation
Databases: Normalisation
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Chapter-13-solutions
Chapter-13-solutionsChapter-13-solutions
Chapter-13-solutions
 
Normalization 1 nf,2nf,3nf,bcnf
Normalization 1 nf,2nf,3nf,bcnf Normalization 1 nf,2nf,3nf,bcnf
Normalization 1 nf,2nf,3nf,bcnf
 
Relational database
Relational  databaseRelational  database
Relational database
 
Database Normalisation
Database NormalisationDatabase Normalisation
Database Normalisation
 
Chapter 2 Relational Data Model-part 2
Chapter 2 Relational Data Model-part 2Chapter 2 Relational Data Model-part 2
Chapter 2 Relational Data Model-part 2
 
Database - Normalization
Database - NormalizationDatabase - Normalization
Database - Normalization
 
Lecture8 Normalization Aggarwal
Lecture8 Normalization AggarwalLecture8 Normalization Aggarwal
Lecture8 Normalization Aggarwal
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
functional dependencies with example
functional dependencies with examplefunctional dependencies with example
functional dependencies with example
 
Database normalization
Database normalizationDatabase normalization
Database normalization
 
Chuẩn hóa CSDL
Chuẩn hóa CSDLChuẩn hóa CSDL
Chuẩn hóa CSDL
 
Database Management System( Normalization)
Database Management System( Normalization)Database Management System( Normalization)
Database Management System( Normalization)
 

Similaire à Normalization (20)

Normalization1
Normalization1Normalization1
Normalization1
 
Normalization
NormalizationNormalization
Normalization
 
Penormalan/Normalization
Penormalan/NormalizationPenormalan/Normalization
Penormalan/Normalization
 
Normalization
NormalizationNormalization
Normalization
 
eaxmple of Normalisation
eaxmple of Normalisationeaxmple of Normalisation
eaxmple of Normalisation
 
UNIT-IV.ppt
UNIT-IV.pptUNIT-IV.ppt
UNIT-IV.ppt
 
Normalisation
NormalisationNormalisation
Normalisation
 
Normmmalizzarion.ppt
Normmmalizzarion.pptNormmmalizzarion.ppt
Normmmalizzarion.ppt
 
chapter_8.pptx
chapter_8.pptxchapter_8.pptx
chapter_8.pptx
 
Chapter10
Chapter10Chapter10
Chapter10
 
UNIT 2 -PPT.pptx
UNIT 2 -PPT.pptxUNIT 2 -PPT.pptx
UNIT 2 -PPT.pptx
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Function Dependencies and Normalization
 Function Dependencies and Normalization Function Dependencies and Normalization
Function Dependencies and Normalization
 
Chapter 9
Chapter 9Chapter 9
Chapter 9
 
Top schools in india
Top schools in indiaTop schools in india
Top schools in india
 
Normalizatrion.ppt
Normalizatrion.pptNormalizatrion.ppt
Normalizatrion.ppt
 
Theory of dependencies in relational database
Theory of dependencies in relational databaseTheory of dependencies in relational database
Theory of dependencies in relational database
 
chapter 4-Functional Dependency and Normilization.pdf
chapter 4-Functional Dependency and Normilization.pdfchapter 4-Functional Dependency and Normilization.pdf
chapter 4-Functional Dependency and Normilization.pdf
 
24042020_normalization 1.pdf
24042020_normalization 1.pdf24042020_normalization 1.pdf
24042020_normalization 1.pdf
 
Lecture No. 21-22.ppt
Lecture No. 21-22.pptLecture No. 21-22.ppt
Lecture No. 21-22.ppt
 

Plus de baabtra.com - No. 1 supplier of quality freshers

Plus de baabtra.com - No. 1 supplier of quality freshers (20)

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
 
Core java - baabtra
Core java - baabtraCore java - baabtra
Core java - baabtra
 
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
 
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Microsoft holo lens
 
Blue brain
Blue brainBlue brain
Blue brain
 
5g
5g5g
5g
 
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Aptitude skills baabtra
 
Gd baabtra
Gd baabtraGd baabtra
Gd baabtra
 

Dernier

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Dernier (20)

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

Normalization

  • 1.
  • 2. NORMALIZATION Rajishma T rajishmatnair@gmail.com www.facebook.com/ Rajishma T Nair twitter.com/username in.linkedin.com/in/profilena me 9020217968
  • 3. Disclaimer: This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring Partner Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
  • 4. NORMALIZATION  Normalization is the process of removing potential anomalies from the database design. These anomalies include: – Insertion anomalies – Update anomalies – Deletion anomalies
  • 5. INSERTION ANOMALIES An insertion anomaly occurs when you can’t enter a record in because some data is missing. Consider a database with the rule that every employee must be assigned to a project, but a newly hired employee doesn’t have a project yet. One solution is to create a dummy project, but this puts bad data into your database and is not a good idea.
  • 6. UPDATE ANOMALIES  Update anomalies occur when the same data is stored in more than one place.  This means whenever you have to make a change to the data, you must do it in several places.  The more times you have to edit the same data in multiple places, the more chances you have of making a mistake, causing inconsistent data.
  • 7. DELETION ANOMALIES causes other data to be lost Deletion anomalies occur when deleting a record accidently .
  • 8.  Normalization: – The process of decomposing unsatisfactory "bad" relations by breaking up their attributes into smaller relations  Normal form: – Condition using keys and FDs of a relation to certify whether a relation schema is in a particular normal form
  • 9. FIRST NORMAL FORM  Only attribute values permitted are single atomic (or indivisible) values Techniques to achieve first normal form – Remove attribute and place in separate relation – Expand the key – Use several atomic attributes
  • 10.
  • 11.
  • 12. SECOND NORMAL FORM  Second Normal Form removes what are called “functional dependencies.”  Functional dependencies are groups of columns that depend on each other rather than on the key of the table.
  • 13.  Functional dependencies (FDs) – Are used to specify formal measures of the "goodness" of relational designs – And keys are used to define normal forms for relations – Are constraints that are derived from the meaning and interrelationships of the data attributes  A set of attributes x functionally depends a set of attributes Y if the value of X determines a unique value for Y
  • 14.  X -> Y holds if whenever two tuples have the same valuefor X, they must have the same value for Y – For any two tuples t1 and t2 in any relation instance r(R): If t1[X]=t2[X], then t1[Y]=t2[Y]  X -> Y in R specifies a constraint on all relation instances r(R)
  • 15. SECOND NORMAL FORM  Formal definition of 2NF is a table that is in 1NF and every non-primary-key column is fully functional dependent on the primary key.  Full functional dependency indicates that if A and B are columns of a table, B is fully dependent on A if B is functionally dependent on A but not on any proper subset of A.
  • 16.
  • 17.
  • 18. TRANSITIONAL DEPENDENCY  Transitive functional dependency: a FD X -> Z that can be derived from two FDs X -> Y and Y -> Z  For example, consider a table with A, B, and C. If B is functional dependent on A and C is functional dependent on B , then C is transitively dependent on A via B (provided that A is not functionally dependent on B or C).  If a transitive dependency exists on the primary key, the table is not in 3NF. `
  • 19.
  • 20.
  • 21. BCNF A relation R is in Boyce/Codd N/F (BCNF) if and only if every determinant is a candidate key. Here, determinant is a simple attribute or composite attribute on which some other attributes is fully functionally dependent. Each normal form is strictly stronger than the previous one Every 2NF relation is in 1NF Every 3NF relation is in 2NF Every BCNF relation is in 3NF  There exist relations that are in 3NF but not in BCNF  The goal is to have each relation in BCNF (or 3NF)
  • 22. campus course class time Room/bldng east English 101 1 8:00-9:00 212 AYE east English 101 2 10:00-11:00 305 RFK West English 101 3 8:00-9:00 102 PPR
  • 23. • no two buildings on any of the university campuses have the same name, thus ROOM/BLDG----- >CAMPUS. As the determinant is not a candidate key this table is not in bcnf. • R1(course, class, room/bldg, time) • course class time Room/bldng English 101 1 8:00-9:00 212 AYE English 101 2 10:00-11:00 305RFK English 101 3 8:00-9:00 102PPR
  • 24. • R2(room/bldg, campus) campus Room/bldng east 212 AYE east 305 RFK west 102 PPR
  • 25. Identify all candidate keys in the relation. Identify all functional dependencies in the relation. If functional dependencies exists in the relation where their determinants are not candidate keys for the relation, remove the functional dependencies by placing them in a new relation along with a copy of their determinant.
  • 26. FOURTH NORMAL FORM 4NF: A relation that is in Boyce-Codd Normal Form and contains no MVDs. BCNF to 4NF involves the removal of the MVD from the relation by placing the attribute(s) in a new relation along with a copy of the determinant
  • 27. MVD multi-valued dependency • Represents a dependency between attributes (for example, A, B, and C) in a relation, such that for each value of A there is a set of values for B, and a set of values for C. However, the set of values for B and C are independent of each other
  • 29. If this presentation helped you, please visit our page facebook.com/baabtra and like it. Thanks in advance. www.baabtra.com | www.massbaab.com |www.baabte.com
  • 30. Contact Us Emarald Mall (Big Bazar Building) Mavoor Road, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 NC Complex, Near Bus Stand Mukkam, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 Start up Village Eranakulam, Kerala, India. Email: info@baabtra.com