Database normalisation by D.Lukachuk

Database Normalization
Principals of Database Normalization
by Dmytro Lukachuk
Overview
• Normalization, main ideas;
• Normal forms;
• Normalization and Denormalization;
• Practical examples.
Normalization
• Normalization is the process of organizing the
attributes and tables to minimize redundancy.
Wikipedia
Aims of normalization:
• Minimize logical redundancy;
• Free the DB of modification anomalies;
• Minimize redesign when extending DB
structure;
• Simplification for applying integrity
constraints.
Edgar Frank Codd
Other suggestions:
• The aim of Normalization is not to decrease or
increase performance;
• The aim of Normalization is not to decrease or
increase physical memory size of DB.
So what is Normalization?
• The process of transformation of database
relations to the structure that fits normal form
(NF).
Normal Form
• A set of requirements (rules, principals) that
satisfy relations in DB.
Normal forms:
• 1st Normal Form (1NF);
• 2nd Normal Form (1NF);
• 3rd Normal Form (3NF);
• Boyce-Codd Normal Form (BCNF);
• 4th Normal Form (4NF);
• 5th Normal Form (5NF);
• Domain/key Normal Form (DKNF);
• 6th Normal Form (6NF).
1st Normal Form Principals
• No top-to-bottom ordering to the rows;
• No left-to-right ordering to the columns;
• No duplicate rows;
• Every cell contains only one value;
• All columns are regular (no hidden
components).
2nd Normal Form Principals
• Relations are in 1st Normal Form;
• Every non-prime attribute is dependent on
candidate key.
3rd Normal Form
• Relations are in 2nd Normal Form;
• Non-prime attribute can be determined only
by the candidate key and not any other non-
prime attribute (transitive dependency).
Employee -> Department
Department -> Telephone
Employee -> Telephone (transitive dependency)
Boyce-Codd Normal Form
• Relations are in 3rd Normal Form
• Primary key does not depend on non-prime
attribute.
Relation is in 3NF but not in BCNF when relation has two or more candidate
key that are composite and have common attribute
Denormalization
• Transformation of DB structure to the form
that does not satisfy normal forms.
• Process of optimizing performance by adding
redundant data or by grouping data.
Advantages
of Normalization
• Smaller
• Fast updates
• Fast inserts
• Less need for heavy group by or distinct
queries as data is not duplicated
Disadvantages of Normalization
• Joins
• Bad indexing strategy
Advantages of Denormalization
• No joins
• Fast select
• Efficient index usage
Disadvantages of Denormalization
• Costly inserts
• Costly updates
Compare
Normalization:
SELECT product_name, order_date
FROM orders
INNER JOIN products USING(product_id)
WHERE product_name like 'A%'
ORDER by order_date DESC
Denormalizaion:
SELECT product_name, order_date
FROM orders
WHERE product_name like 'A%'
ORDER by order_date DESC
Slider structure analysis:
Slider table
Slider_config table
Slider_config_scope
Slide table
Slide_config table
Controversial aspects
What is the best way?
The best way is to –
MIX principals of normalization with
denormalization approach depending on
certain application purposes.
1 de 26

Recomendados

Normalization form tutorialNormalization form tutorial
Normalization form tutorialNikhildas P C
6.5K visualizações19 slides
Data normailazationData normailazation
Data normailazationLalit Kale
1.1K visualizações20 slides
Normalization and Codd's Rule Normalization and Codd's Rule
Normalization and Codd's Rule lubna19
7.7K visualizações42 slides
Normalization 1 nf,2nf,3nf,bcnf Normalization 1 nf,2nf,3nf,bcnf
Normalization 1 nf,2nf,3nf,bcnf Shriya agrawal
3.6K visualizações22 slides
Slideshare pptSlideshare ppt
Slideshare pptMandy Suzanne
2.4M visualizações3 slides

Mais conteúdo relacionado

Similar a Database normalisation by D.Lukachuk

normalization-1.pptxnormalization-1.pptx
normalization-1.pptxAbhishekJohnCharan1
3 visualizações12 slides
Introduction to UMLIntroduction to UML
Introduction to UMLSunil-QA
147 visualizações67 slides
OOAD and UMLOOAD and UML
OOAD and UMLSunil-QA
379 visualizações67 slides
Database - NormalizationDatabase - Normalization
Database - NormalizationMudasir Qazi
3.1K visualizações21 slides

Similar a Database normalisation by D.Lukachuk(20)

Introduction to Database Management.pptxIntroduction to Database Management.pptx
Introduction to Database Management.pptx
GevitaChinnaiah2 visualizações
normalization-1.pptxnormalization-1.pptx
normalization-1.pptx
AbhishekJohnCharan13 visualizações
Introduction to UMLIntroduction to UML
Introduction to UML
Sunil-QA147 visualizações
OOAD and UMLOOAD and UML
OOAD and UML
Sunil-QA379 visualizações
Database - NormalizationDatabase - Normalization
Database - Normalization
Mudasir Qazi3.1K visualizações
Chapter 5 - Normalization of Database Tables.pdfChapter 5 - Normalization of Database Tables.pdf
Chapter 5 - Normalization of Database Tables.pdf
JervinCagaananSapidR17 visualizações
NormalizationNormalization
Normalization
Altafsoomro1.5K visualizações
normaliztionnormaliztion
normaliztion
Ramadhani S. Zuberi533 visualizações
Exception & DatabaseException & Database
Exception & Database
Jamshid Hashimi588 visualizações
BcnfBcnf
Bcnf
baabtra.com - No. 1 supplier of quality freshers9.8K visualizações
Got documents - The Raven Bouns EditionGot documents - The Raven Bouns Edition
Got documents - The Raven Bouns Edition
Maggie Pint2.3K visualizações
Chapter 1Chapter 1
Chapter 1
University Institute of Management sciences342 visualizações
Master Data Management.pptxMaster Data Management.pptx
Master Data Management.pptx
Muhammad Fahad Bhatti317 visualizações
Datawarehousing TerminologyDatawarehousing Terminology
Datawarehousing Terminology
Dev EngineersSaathi492 visualizações
IDS Presentation.pptxIDS Presentation.pptx
IDS Presentation.pptx
lakshaydagar62 visualizações
Database Normalization.docxDatabase Normalization.docx
Database Normalization.docx
SHARMISTHAlearning12 visualizações
2 normalization2 normalization
2 normalization
Mr Patrick NIYISHAKA797 visualizações
1.4 data independence1.4 data independence
1.4 data independence
BHARATH KUMAR1.8K visualizações
Unit 2_DBMS_10.2.22.pptxUnit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptx
MaryJoseph796 visualizações
Intro to Data warehousing   lecture 10Intro to Data warehousing   lecture 10
Intro to Data warehousing lecture 10
AnwarrChaudary39 visualizações

Último(20)

Wire RopeWire Rope
Wire Rope
Iwiss Tools Co.,Ltd8 visualizações
Electronic Devices - Integrated Circuit.pdfElectronic Devices - Integrated Circuit.pdf
Electronic Devices - Integrated Circuit.pdf
booksarpita10 visualizações
What is Unit TestingWhat is Unit Testing
What is Unit Testing
Sadaaki Emura21 visualizações
String.pptxString.pptx
String.pptx
Ananthi Palanisamy47 visualizações
SWM L1-L14_drhasan (Part 1).pdfSWM L1-L14_drhasan (Part 1).pdf
SWM L1-L14_drhasan (Part 1).pdf
MahmudHasan74787044 visualizações
LFA-NPG-Paper.pdfLFA-NPG-Paper.pdf
LFA-NPG-Paper.pdf
harinsrikanth40 visualizações
Object Oriented Programming with JAVAObject Oriented Programming with JAVA
Object Oriented Programming with JAVA
Demian Antony D'Mello58 visualizações
What is Whirling Hygrometer.pdfWhat is Whirling Hygrometer.pdf
What is Whirling Hygrometer.pdf
IIT KHARAGPUR 10 visualizações
SEMI CONDUCTORSSEMI CONDUCTORS
SEMI CONDUCTORS
pavaniaalla200516 visualizações
FLOW IN PIPES NOTES.pdfFLOW IN PIPES NOTES.pdf
FLOW IN PIPES NOTES.pdf
Dearest Arhelo85 visualizações
Sanitary Landfill- SWM.pptxSanitary Landfill- SWM.pptx
Sanitary Landfill- SWM.pptx
Vinod Nejkar5 visualizações
PlumbingPlumbing
Plumbing
Iwiss Tools Co.,Ltd11 visualizações
IWISS Catalog 2022IWISS Catalog 2022
IWISS Catalog 2022
Iwiss Tools Co.,Ltd23 visualizações
Deutsch CrimpingDeutsch Crimping
Deutsch Crimping
Iwiss Tools Co.,Ltd15 visualizações
Dynamics of Hard-Magnetic Soft MaterialsDynamics of Hard-Magnetic Soft Materials
Dynamics of Hard-Magnetic Soft Materials
Shivendra Nandan13 visualizações
CHI-SQUARE ( χ2) TESTS.pptxCHI-SQUARE ( χ2) TESTS.pptx
CHI-SQUARE ( χ2) TESTS.pptx
ssusera597c514 visualizações

Database normalisation by D.Lukachuk