SlideShare a Scribd company logo
Learn BI, Analytics and Big Data 
Module: Normalization
Normalization 
BIWHIZ 
Normalization is a set of rules to allocate data to 
tables in such a way as to minimize the 
redundancy and to minimize certain anomalies 
related to insert, delete and update of data. 
BIWHIZ 2
Normalization 
BIWHIZ 
Anomalies 
A major objective of data normalization is to avoid modification anomalies. 
These come in three flavors: 
• An insertion anomaly is a failure to place information into all the places in 
the database. In a properly normalized database, information about a new 
entry needs to be inserted into only one place in the database. 
• A deletion anomaly is a failure to remove information about an existing 
database entry from all places. In a properly normalized database, the 
entry needs to be deleted from only one. 
• A update anomaly is a failure to update information about an existing 
database entry from all places. 
All three kinds of anomalies are highly undesirable, since their occurrence 
constitutes corruption of the database. 
BIWHIZ 3
Normalization 
BIWHIZ 
First Normal Form 
• A Relations is said to be in First Normal Form (1NF) when it contains no 
multi-valued attribute, i.e. every attribute must contain at most one data 
value. 
• In other words a table is in first normal form if all the key attributes have 
been defined and it contains no repeating groups. 
BIWHIZ 4
Normalization 
First Normal Form 
Example: Let us assume an ORDER table as below: 
BIWHIZ 
ORDER 
order_id customer_id product1 product2 product3 
123 456 abc1 def1 ghi1 
456 789 abc2 
This structure creates the following problems: 
•Order 123 has no room for more than 3 products. 
•Order 456 has wasted space for product2 and product3. 
BIWHIZ 5
Normalization 
BIWHIZ 
First Normal Form 
In order to create a table that is in first normal form we must extract the 
repeating groups and place them in a separate table. 
We have removed 'product1', 'product2' and 'product3', so there are no repeating groups. 
6 
ORDER 
order_id customer_id 
123 456 
456 789 
ORDER_LINE 
order_id product 
123 abc1 
123 def1 
123 ghi1 
456 abc2
Normalization 
BIWHIZ 
Second Normal Form 
A relation is said to be in 2nd Normal Form if 
• The relation is in 1st Normal Form 
• Every non key attribute is fully functionally dependent on the whole of the 
primary key (i.e. there are no partial dependencies). 
1. Anomalies can occur when attributes are dependent on only part of a 
BIWHIZ 7 
multi-attribute (composite) key. 
2. A relation is in second normal form when all non-key attributes are 
dependent on the whole key. That is, no attribute is dependent on only 
a part of the key. 
3. Any relation having a key with a single attribute is in second normal 
form.
Normalization 
Second Normal Form 
Take the following table structure as an example: 
order(order_id, cust_id, cust_address, cust_contact, order_date, 
order_total) 
BIWHIZ 
Here we should realize that cust_address and cust_contact are functionally 
dependent on cust_id but not on order_id, therefore they are not dependent 
on the whole key. To make this table 2NF these attributes must be removed 
and placed somewhere else. 
order_cust(order_id, cust_id, order_date, order_total) 
customer(cust_id, cust_address, cust_contact) 
BIWHIZ 8
Normalization 
BIWHIZ 
Second Normal Form 
So what problems can occur if we do not make it into 2nd Normal Form? 
It can result into 
Update anomaly: If you want to update the address of a customer, need to 
update in all orders made by this customer, if update is missed at any place 
then data will be inconsistent. 
Insert anomaly: There is no way to add a customer information he he/she has 
not made any order. 
BIWHIZ 9
Normalization 
BIWHIZ 
Third Normal Form 
A relation is said to be in Third Normal Form if 
• The relation is in Second Normal Form 
• There is no transitive dependency (that is, all the non-key attributes 
depend only on the primary key) 
In other words, A relation is in 3NF when 'All non-key attributes are 
dependent on the key, the whole key and nothing but the key'. 
BIWHIZ 10
Normalization 
BIWHIZ 
Third Normal Form 
An example of a 2NF table that fails to meet the requirements of 3NF is: 
BIWHIZ 11 
Tournament Winners 
Tournament Year Winner 
Winner Date of 
Birth 
Indiana Invitational 1998 Al Fredrickson 21 July 1975 
Cleveland Open 1999 Bob Albertson 28 September 1968 
Des Moines 
1999 Al Fredrickson 21 July 1975 
Masters 
Indiana Invitational 1999 Chip Masterson 14 March 1977
Normalization 
BIWHIZ 
Third Normal Form 
• Because each row in the table needs to tell us who won a particular 
Tournament in a particular Year, the composite key {Tournament, Year} is a 
minimal set of attributes guaranteed to uniquely identify a row. That is, 
{Tournament, Year} is a candidate key for the table. 
• The breach of 3NF occurs because the non-prime attribute Winner Date of 
Birth is transitively dependent on the candidate key {Tournament, Year} 
via the non-prime attribute Winner. The fact that Winner Date of Birth is 
functionally dependent on Winner makes the table vulnerable to logical 
inconsistencies, as there is nothing to stop the same person from being 
shown with different dates of birth on different records. 
BIWHIZ 12
Normalization 
BIWHIZ 
Third Normal Form 
In order to express the same facts without violating 
3NF, it is necessary to split the table into two: 
Tournament Winners 
Tournament Year Winner 
Indiana Invitational 1998 Al Fredrickson 
Cleveland Open 1999 Bob Albertson 
Des Moines Masters 1999 Al Fredrickson 
Indiana Invitational 1999 Chip Masterson 
Winner Dates of Birth 
Winner Date of Birth 
Chip Masterson 14 March 1977 
Al Fredrickson 21 July 1975 
Bob Albertson 28 September 1968 
BIWHIZ 13
Normalization 
BIWHIZ 
So we may ask what is the difference between 2nd 
Normal Form and 3rd Normal Form in these two 
examples? 
In Order example, the customer address and customer 
contact is part of the Order information as these values 
might be needed for delivery purpose so they are 
dependent on part of primary keys. 
In Winner example, date of birth is not needed for the 
transaction(win or loss ) , this is just an extra 
information which is dependent only on Winner, 
nothing to do with a win or loss. 
BIWHIZ 14
Normalization 
Boyce-Code Normal Form (BCNF) 
A relation is said to be in BCNF if 
• The relation is in Third Normal Form 
• And every determinant is a candidate key. 
BIWHIZ 
BIWHIZ 15
Normalization 
BIWHIZ 
Boyce-Code Normal Form (BCNF) 
• Anomalies can occur in relations in 3NF if there is 
a composite key in which part of that key has a 
determinant which is not itself a candidate key. 
• This can be expressed as R(A,B,C), C A where: 
– The relation contains attributes A, B and C. 
– A and B form a candidate key. 
– C is the determinant for A (A is functionally dependent 
on C). 
– C is not part of any key. 
BIWHIZ 16
Normalization 
Boyce-Code Normal Form (BCNF) 
Take the following table structure as an 
example: 
• schedule(campus, course, class, time, 
building) 
• Take the following sample data: 
BIWHIZ 
campus course class time building 
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 
BIWHIZ 17
Normalization 
BIWHIZ 
Boyce-Code Normal Form (BCNF) 
Note that no two buildings on any of the 
university campuses have the same name, thus 
BUILDING CAMPUS. As the determinant is not 
a candidate key this table is NOT in Boyce-Codd 
normal form. 
campus course class time building 
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 
BIWHIZ 18
Normalization 
BIWHIZ 
Boyce-Code Normal Form (BCNF) 
• This table should be decomposed into the 
following relations: 
• R1(course, class, building, time) 
• R2(building, campus) 
BIWHIZ 19
Normalization 
BIWHIZ 
Boyce-Code Normal Form (BCNF) 
What if we do not apply BCNF form?? 
Every time when you want to update Campus 
and Building you have to check the other one 
and make a corresponding update on that as 
well. This can result in update anomaly. 
BIWHIZ 20
Normalization 
BIWHIZ 
Fourth Normal Form 
A table is in fourth normal form (4NF) if and only if it is in 
BCNF and contains no more than one multi-valued 
dependency. 
• Anomalies can occur in relations in BCNF if there is 
more than one multi-valued dependency. 
• If A-- >> B and A-- >> C but B and C are unrelated, ie 
A - - >>(B,C) is false, then we have more than one multi-valued 
dependency. 
BIWHIZ 21
Normalization 
Fourth Normal Form 
Take the following table structure as an example: 
info(employee#, skills, hobbies) 
Take the following sample data: 
BIWHIZ 
22 
employee# skills hobbies 
1 Programming Golf 
1 Programming Bowling 
1 Analysis Golf 
1 Analysis Bowling 
2 Analysis Golf 
2 Analysis Gardening 
2 Management Golf 
2 Management Gardening
Normalization 
BIWHIZ 
Fourth Normal Form 
Exercise: Try adding a new hobby?? 
This table is difficult to maintain since adding a new 
hobby requires multiple new rows corresponding to 
each skill. 
This problem is created by the pair of multi-valued 
dependencies EMPLOYEE# -- >>SKILLS and EMPLOYEE#-- 
>>HOBBIES. A much better alternative would be to 
decompose INFO into two relations: 
• skills(employee#, skill) 
• hobbies(employee#, hobby) 
BIWHIZ 23
Normalization 
BIWHIZ 
Fifth Normal Form 
A table is in fifth normal form (5NF) or Projection-Join 
Normal Form (PJNF) if it is in 4NF and it cannot have a 
lossless decomposition into any number of smaller tables. 
In another words , if we try to decompose it further then 
we will not be able to join them back and get the original 
table. 
(4th and 5th Normal Forms are applicable for Key-Only 
tables so there is no question of looking at 1st, 2nd, 3rd or 
BCNF normal forms, they are already there) 
BIWHIZ 24
Normalization 
BIWHIZ 
Fifth Normal Form 
Take the following table structure as an 
example: 
buying(buyer, vendor, item) 
This is used to track buyers, what they buy, and 
from whom they buy. 
Take the following sample data: 
BIWHIZ 25
Normalization 
BIWHIZ 
buyer vendor item 
Sally Liz Claiborne Bags 
Mary Liz Claiborne Bags 
Sally Jordach Jeans 
Mary Jordach Jeans 
Sally Jordach Sneakers 
BIWHIZ 26 
Fifth Normal Form 
The question is, what do you do if Claiborne starts to sell Jeans? How many rows 
must you create to record this fact? 
The problem is there are pairwise cyclical dependencies in the primary key. That is, 
in order to determine the item you must know the buyer and vendor, and to 
determine the vendor you must know the buyer and the item, and finally to know 
the buyer you must know the vendor and the item. 
The solution is to break this one table into three tables; Buyer-Vendor, Buyer-Item, 
and Vendor-Item.
Normalization 
BIWHIZ 
BIWHIZ 27 
Fifth Normal Form 
buyer vendor 
Sally Liz Claiborne 
Mary Liz Claiborne 
Sally Jordach 
Mary Jordach 
buyer item 
Sally Bags 
Mary Bags 
Sally Jeans 
Mary Jeans 
Sally Sneakers 
vendor item 
Liz Claiborne Bags 
Jordach Jeans 
Jordach Sneakers
Questions? 
BIWHIZ 
BIWHIZ 28

More Related Content

What's hot

database Normalization
database Normalizationdatabase Normalization
database Normalization
Harsiddhi Thakkar
 
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Oum Saokosal
 
Normalization in a Database
Normalization in a DatabaseNormalization in a Database
Normalization in a Database
Bishrul Haq
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
Arun Sharma
 
Advanced normalization - Bcnf
Advanced normalization - BcnfAdvanced normalization - Bcnf
Advanced normalization - Bcnf
litpuvn
 
Database anomalies
Database anomaliesDatabase anomalies
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
Hitesh Mohapatra
 
Databases: Normalisation
Databases: NormalisationDatabases: Normalisation
Databases: Normalisation
Damian T. Gordon
 
Lect 08 materialized view
Lect 08 materialized viewLect 08 materialized view
Lect 08 materialized view
Bilal khan
 
Normalization of database tables
Normalization of database tablesNormalization of database tables
Normalization of database tables
Dhani Ahmad
 
Dbms normalization
Dbms normalizationDbms normalization
Dbms normalization
Pratik Devmurari
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Database - Normalization
Database - NormalizationDatabase - Normalization
Database - Normalization
Mudasir Qazi
 
Functional dependency
Functional dependencyFunctional dependency
Functional dependency
Sakshi Jaiswal
 
View & index in SQL
View & index in SQLView & index in SQL
View & index in SQL
Swapnali Pawar
 
Normalization
NormalizationNormalization
Homogeneous ddbms
Homogeneous ddbmsHomogeneous ddbms
Homogeneous ddbms
Pooja Dixit
 
Normalization in RDBMS
Normalization in RDBMSNormalization in RDBMS
Normalization in RDBMS
JananiSelvaraj10
 
15. Transactions in DBMS
15. Transactions in DBMS15. Transactions in DBMS
15. Transactions in DBMS
koolkampus
 
Normalization
NormalizationNormalization
Normalization
Wangu Thupa
 

What's hot (20)

database Normalization
database Normalizationdatabase Normalization
database Normalization
 
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
 
Normalization in a Database
Normalization in a DatabaseNormalization in a Database
Normalization in a Database
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
Advanced normalization - Bcnf
Advanced normalization - BcnfAdvanced normalization - Bcnf
Advanced normalization - Bcnf
 
Database anomalies
Database anomaliesDatabase anomalies
Database anomalies
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Databases: Normalisation
Databases: NormalisationDatabases: Normalisation
Databases: Normalisation
 
Lect 08 materialized view
Lect 08 materialized viewLect 08 materialized view
Lect 08 materialized view
 
Normalization of database tables
Normalization of database tablesNormalization of database tables
Normalization of database tables
 
Dbms normalization
Dbms normalizationDbms normalization
Dbms normalization
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Database - Normalization
Database - NormalizationDatabase - Normalization
Database - Normalization
 
Functional dependency
Functional dependencyFunctional dependency
Functional dependency
 
View & index in SQL
View & index in SQLView & index in SQL
View & index in SQL
 
Normalization
NormalizationNormalization
Normalization
 
Homogeneous ddbms
Homogeneous ddbmsHomogeneous ddbms
Homogeneous ddbms
 
Normalization in RDBMS
Normalization in RDBMSNormalization in RDBMS
Normalization in RDBMS
 
15. Transactions in DBMS
15. Transactions in DBMS15. Transactions in DBMS
15. Transactions in DBMS
 
Normalization
NormalizationNormalization
Normalization
 

Viewers also liked

DBMS - Normalization
DBMS - NormalizationDBMS - Normalization
DBMS - Normalization
Jitendra Tomar
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
Rathan Raj
 
Normalization
NormalizationNormalization
Normalization
ochesing
 
Bcnf
BcnfBcnf
Lecture8 Normalization Aggarwal
Lecture8 Normalization AggarwalLecture8 Normalization Aggarwal
Lecture8 Normalization Aggarwal
anerudhbalaji
 
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
 
Timestamp based protocol
Timestamp based protocolTimestamp based protocol
Timestamp based protocol
Vincent Chu
 
Validation based protocol
Validation based protocolValidation based protocol
Validation based protocol
BBDITM LUCKNOW
 
NORMALIZATION - BIS 1204: Data and Information Management I
NORMALIZATION - BIS 1204: Data and Information Management I NORMALIZATION - BIS 1204: Data and Information Management I
NORMALIZATION - BIS 1204: Data and Information Management I
Mukalele Rogers
 
Security and Integrity
Security and IntegritySecurity and Integrity
Security and Integrity
lubna19
 
Validation Protocol
Validation ProtocolValidation Protocol
Validation Protocol
Sagar Savale
 
Data models
Data modelsData models
Data models
Anuj Modi
 
6. Integrity and Security in DBMS
6. Integrity and Security in DBMS6. Integrity and Security in DBMS
6. Integrity and Security in DBMS
koolkampus
 
Dbms models
Dbms modelsDbms models
Dbms models
devgocool
 
Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPT
Trinath
 

Viewers also liked (16)

DBMS - Normalization
DBMS - NormalizationDBMS - Normalization
DBMS - Normalization
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
Normalization
NormalizationNormalization
Normalization
 
Bcnf
BcnfBcnf
Bcnf
 
5 level
5 level5 level
5 level
 
Lecture8 Normalization Aggarwal
Lecture8 Normalization AggarwalLecture8 Normalization Aggarwal
Lecture8 Normalization Aggarwal
 
Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)
 
Timestamp based protocol
Timestamp based protocolTimestamp based protocol
Timestamp based protocol
 
Validation based protocol
Validation based protocolValidation based protocol
Validation based protocol
 
NORMALIZATION - BIS 1204: Data and Information Management I
NORMALIZATION - BIS 1204: Data and Information Management I NORMALIZATION - BIS 1204: Data and Information Management I
NORMALIZATION - BIS 1204: Data and Information Management I
 
Security and Integrity
Security and IntegritySecurity and Integrity
Security and Integrity
 
Validation Protocol
Validation ProtocolValidation Protocol
Validation Protocol
 
Data models
Data modelsData models
Data models
 
6. Integrity and Security in DBMS
6. Integrity and Security in DBMS6. Integrity and Security in DBMS
6. Integrity and Security in DBMS
 
Dbms models
Dbms modelsDbms models
Dbms models
 
Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPT
 

Similar to Learn Normalization in simple language

Normalization.riz
Normalization.rizNormalization.riz
Normalization.riz
Muhammad Imran Khan
 
Database normalization
Database normalizationDatabase normalization
Database normalization
Vaibhav Kathuria
 
1-161103092724 (1).pdf
1-161103092724 (1).pdf1-161103092724 (1).pdf
1-161103092724 (1).pdf
BasirKhan21
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
Prateek Parimal
 
Understanding about relational database m-square systems inc
Understanding about relational database m-square systems incUnderstanding about relational database m-square systems inc
Understanding about relational database m-square systems inc
Muthu Natarajan
 
45 Essential SQL Interview Questions
45 Essential SQL Interview Questions45 Essential SQL Interview Questions
45 Essential SQL Interview Questions
Best SEO Tampa
 
1-161103092724.pzxsdfdsdrgdrgdfgdfgdfgdfgptx
1-161103092724.pzxsdfdsdrgdrgdfgdfgdfgdfgptx1-161103092724.pzxsdfdsdrgdrgdfgdfgdfgdfgptx
1-161103092724.pzxsdfdsdrgdrgdfgdfgdfgdfgptx
wrushabhsirsat
 
1-161103092724.pptx
1-161103092724.pptx1-161103092724.pptx
1-161103092724.pptx
YashaswiniSrinivasan1
 
Presentation on Normalization.pptx
Presentation on Normalization.pptxPresentation on Normalization.pptx
Presentation on Normalization.pptx
kshipra sony
 
Topics-Ch4Ch5.ppt
Topics-Ch4Ch5.pptTopics-Ch4Ch5.ppt
Topics-Ch4Ch5.ppt
ahmadfaisal744721
 
Topics-Ch4Ch5.ppt
Topics-Ch4Ch5.pptTopics-Ch4Ch5.ppt
Topics-Ch4Ch5.ppt
ahmadfaisal744721
 
Normalization and three normal forms.pptx
Normalization and three normal forms.pptxNormalization and three normal forms.pptx
Normalization and three normal forms.pptx
Zoha681526
 
Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3
Eddyzulham Mahluzydde
 
Normalization.ppt
Normalization.pptNormalization.ppt
Normalization.ppt
ArhamBaloch1
 
Database normalization
Database normalizationDatabase normalization
Database normalization
Jignesh Jain
 
Data normailazation
Data normailazationData normailazation
Data normailazation
Lalit Kale
 
PHP mysql Database normalizatin
PHP mysql  Database normalizatinPHP mysql  Database normalizatin
PHP mysql Database normalizatin
Mudasir Syed
 
Databases
DatabasesDatabases
Databases
odalyfer
 
Course Presentation.pdf
Course Presentation.pdfCourse Presentation.pdf
Course Presentation.pdf
BiniyamTezera1
 
Normalization in databases
Normalization in databasesNormalization in databases

Similar to Learn Normalization in simple language (20)

Normalization.riz
Normalization.rizNormalization.riz
Normalization.riz
 
Database normalization
Database normalizationDatabase normalization
Database normalization
 
1-161103092724 (1).pdf
1-161103092724 (1).pdf1-161103092724 (1).pdf
1-161103092724 (1).pdf
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Understanding about relational database m-square systems inc
Understanding about relational database m-square systems incUnderstanding about relational database m-square systems inc
Understanding about relational database m-square systems inc
 
45 Essential SQL Interview Questions
45 Essential SQL Interview Questions45 Essential SQL Interview Questions
45 Essential SQL Interview Questions
 
1-161103092724.pzxsdfdsdrgdrgdfgdfgdfgdfgptx
1-161103092724.pzxsdfdsdrgdrgdfgdfgdfgdfgptx1-161103092724.pzxsdfdsdrgdrgdfgdfgdfgdfgptx
1-161103092724.pzxsdfdsdrgdrgdfgdfgdfgdfgptx
 
1-161103092724.pptx
1-161103092724.pptx1-161103092724.pptx
1-161103092724.pptx
 
Presentation on Normalization.pptx
Presentation on Normalization.pptxPresentation on Normalization.pptx
Presentation on Normalization.pptx
 
Topics-Ch4Ch5.ppt
Topics-Ch4Ch5.pptTopics-Ch4Ch5.ppt
Topics-Ch4Ch5.ppt
 
Topics-Ch4Ch5.ppt
Topics-Ch4Ch5.pptTopics-Ch4Ch5.ppt
Topics-Ch4Ch5.ppt
 
Normalization and three normal forms.pptx
Normalization and three normal forms.pptxNormalization and three normal forms.pptx
Normalization and three normal forms.pptx
 
Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3
 
Normalization.ppt
Normalization.pptNormalization.ppt
Normalization.ppt
 
Database normalization
Database normalizationDatabase normalization
Database normalization
 
Data normailazation
Data normailazationData normailazation
Data normailazation
 
PHP mysql Database normalizatin
PHP mysql  Database normalizatinPHP mysql  Database normalizatin
PHP mysql Database normalizatin
 
Databases
DatabasesDatabases
Databases
 
Course Presentation.pdf
Course Presentation.pdfCourse Presentation.pdf
Course Presentation.pdf
 
Normalization in databases
Normalization in databasesNormalization in databases
Normalization in databases
 

More from FirstWire Apps

7 Ways To Increase Website Traffic
7 Ways To Increase Website Traffic7 Ways To Increase Website Traffic
7 Ways To Increase Website Traffic
FirstWire Apps
 
10 Ways Content Marketers & SEO Professional Can Boost Client Lifetime Value
10 Ways Content Marketers & SEO Professional Can Boost Client Lifetime Value10 Ways Content Marketers & SEO Professional Can Boost Client Lifetime Value
10 Ways Content Marketers & SEO Professional Can Boost Client Lifetime Value
FirstWire Apps
 
7 Beneficial Tips to Follow for Content Creation
7 Beneficial Tips to Follow for Content Creation7 Beneficial Tips to Follow for Content Creation
7 Beneficial Tips to Follow for Content Creation
FirstWire Apps
 
Important Tips To Follow For Effective Advertising
Important Tips To Follow For Effective AdvertisingImportant Tips To Follow For Effective Advertising
Important Tips To Follow For Effective Advertising
FirstWire Apps
 
Important tips for optimizing your images on Amazon
Important tips for optimizing your images on  AmazonImportant tips for optimizing your images on  Amazon
Important tips for optimizing your images on Amazon
FirstWire Apps
 
5 steps to grow your business successfully
5 steps to grow your business successfully5 steps to grow your business successfully
5 steps to grow your business successfully
FirstWire Apps
 
How does affiliate marketing work?
How does affiliate marketing work?How does affiliate marketing work?
How does affiliate marketing work?
FirstWire Apps
 
7 Tips to get more Traffic by Optimising your images for SEO
7 Tips to get more Traffic by Optimising your images for SEO7 Tips to get more Traffic by Optimising your images for SEO
7 Tips to get more Traffic by Optimising your images for SEO
FirstWire Apps
 
21 Things You Need To Know About FB
21 Things You Need To Know About FB21 Things You Need To Know About FB
21 Things You Need To Know About FB
FirstWire Apps
 
Benefits of PPC Advertising
Benefits of PPC AdvertisingBenefits of PPC Advertising
Benefits of PPC Advertising
FirstWire Apps
 
Seo Factors for Optimal Ranking
Seo Factors for Optimal RankingSeo Factors for Optimal Ranking
Seo Factors for Optimal Ranking
FirstWire Apps
 
Shopify vs Magento
Shopify vs MagentoShopify vs Magento
Shopify vs Magento
FirstWire Apps
 

More from FirstWire Apps (12)

7 Ways To Increase Website Traffic
7 Ways To Increase Website Traffic7 Ways To Increase Website Traffic
7 Ways To Increase Website Traffic
 
10 Ways Content Marketers & SEO Professional Can Boost Client Lifetime Value
10 Ways Content Marketers & SEO Professional Can Boost Client Lifetime Value10 Ways Content Marketers & SEO Professional Can Boost Client Lifetime Value
10 Ways Content Marketers & SEO Professional Can Boost Client Lifetime Value
 
7 Beneficial Tips to Follow for Content Creation
7 Beneficial Tips to Follow for Content Creation7 Beneficial Tips to Follow for Content Creation
7 Beneficial Tips to Follow for Content Creation
 
Important Tips To Follow For Effective Advertising
Important Tips To Follow For Effective AdvertisingImportant Tips To Follow For Effective Advertising
Important Tips To Follow For Effective Advertising
 
Important tips for optimizing your images on Amazon
Important tips for optimizing your images on  AmazonImportant tips for optimizing your images on  Amazon
Important tips for optimizing your images on Amazon
 
5 steps to grow your business successfully
5 steps to grow your business successfully5 steps to grow your business successfully
5 steps to grow your business successfully
 
How does affiliate marketing work?
How does affiliate marketing work?How does affiliate marketing work?
How does affiliate marketing work?
 
7 Tips to get more Traffic by Optimising your images for SEO
7 Tips to get more Traffic by Optimising your images for SEO7 Tips to get more Traffic by Optimising your images for SEO
7 Tips to get more Traffic by Optimising your images for SEO
 
21 Things You Need To Know About FB
21 Things You Need To Know About FB21 Things You Need To Know About FB
21 Things You Need To Know About FB
 
Benefits of PPC Advertising
Benefits of PPC AdvertisingBenefits of PPC Advertising
Benefits of PPC Advertising
 
Seo Factors for Optimal Ranking
Seo Factors for Optimal RankingSeo Factors for Optimal Ranking
Seo Factors for Optimal Ranking
 
Shopify vs Magento
Shopify vs MagentoShopify vs Magento
Shopify vs Magento
 

Recently uploaded

Monthly Management report for the Month of May 2024
Monthly Management report for the Month of May 2024Monthly Management report for the Month of May 2024
Monthly Management report for the Month of May 2024
facilitymanager11
 
一比一原版南十字星大学毕业证(SCU毕业证书)学历如何办理
一比一原版南十字星大学毕业证(SCU毕业证书)学历如何办理一比一原版南十字星大学毕业证(SCU毕业证书)学历如何办理
一比一原版南十字星大学毕业证(SCU毕业证书)学历如何办理
slg6lamcq
 
一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理
bmucuha
 
原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理
原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理
原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理
a9qfiubqu
 
原版一比一多伦多大学毕业证(UofT毕业证书)如何办理
原版一比一多伦多大学毕业证(UofT毕业证书)如何办理原版一比一多伦多大学毕业证(UofT毕业证书)如何办理
原版一比一多伦多大学毕业证(UofT毕业证书)如何办理
mkkikqvo
 
"Financial Odyssey: Navigating Past Performance Through Diverse Analytical Lens"
"Financial Odyssey: Navigating Past Performance Through Diverse Analytical Lens""Financial Odyssey: Navigating Past Performance Through Diverse Analytical Lens"
"Financial Odyssey: Navigating Past Performance Through Diverse Analytical Lens"
sameer shah
 
一比一原版(CU毕业证)卡尔顿大学毕业证如何办理
一比一原版(CU毕业证)卡尔顿大学毕业证如何办理一比一原版(CU毕业证)卡尔顿大学毕业证如何办理
一比一原版(CU毕业证)卡尔顿大学毕业证如何办理
bmucuha
 
Open Source Contributions to Postgres: The Basics POSETTE 2024
Open Source Contributions to Postgres: The Basics POSETTE 2024Open Source Contributions to Postgres: The Basics POSETTE 2024
Open Source Contributions to Postgres: The Basics POSETTE 2024
ElizabethGarrettChri
 
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
ihavuls
 
Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......
Sachin Paul
 
A presentation that explain the Power BI Licensing
A presentation that explain the Power BI LicensingA presentation that explain the Power BI Licensing
A presentation that explain the Power BI Licensing
AlessioFois2
 
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data LakeViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
Walaa Eldin Moustafa
 
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
nuttdpt
 
Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...
Bill641377
 
Intelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicineIntelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicine
AndrzejJarynowski
 
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging DataPredictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
Kiwi Creative
 
一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理
aqzctr7x
 
Challenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more importantChallenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more important
Sm321
 
一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理
一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理
一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理
xclpvhuk
 
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
hyfjgavov
 

Recently uploaded (20)

Monthly Management report for the Month of May 2024
Monthly Management report for the Month of May 2024Monthly Management report for the Month of May 2024
Monthly Management report for the Month of May 2024
 
一比一原版南十字星大学毕业证(SCU毕业证书)学历如何办理
一比一原版南十字星大学毕业证(SCU毕业证书)学历如何办理一比一原版南十字星大学毕业证(SCU毕业证书)学历如何办理
一比一原版南十字星大学毕业证(SCU毕业证书)学历如何办理
 
一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理
 
原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理
原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理
原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理
 
原版一比一多伦多大学毕业证(UofT毕业证书)如何办理
原版一比一多伦多大学毕业证(UofT毕业证书)如何办理原版一比一多伦多大学毕业证(UofT毕业证书)如何办理
原版一比一多伦多大学毕业证(UofT毕业证书)如何办理
 
"Financial Odyssey: Navigating Past Performance Through Diverse Analytical Lens"
"Financial Odyssey: Navigating Past Performance Through Diverse Analytical Lens""Financial Odyssey: Navigating Past Performance Through Diverse Analytical Lens"
"Financial Odyssey: Navigating Past Performance Through Diverse Analytical Lens"
 
一比一原版(CU毕业证)卡尔顿大学毕业证如何办理
一比一原版(CU毕业证)卡尔顿大学毕业证如何办理一比一原版(CU毕业证)卡尔顿大学毕业证如何办理
一比一原版(CU毕业证)卡尔顿大学毕业证如何办理
 
Open Source Contributions to Postgres: The Basics POSETTE 2024
Open Source Contributions to Postgres: The Basics POSETTE 2024Open Source Contributions to Postgres: The Basics POSETTE 2024
Open Source Contributions to Postgres: The Basics POSETTE 2024
 
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
 
Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......
 
A presentation that explain the Power BI Licensing
A presentation that explain the Power BI LicensingA presentation that explain the Power BI Licensing
A presentation that explain the Power BI Licensing
 
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data LakeViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
 
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
 
Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...
 
Intelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicineIntelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicine
 
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging DataPredictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
 
一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理
 
Challenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more importantChallenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more important
 
一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理
一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理
一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理
 
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
 

Learn Normalization in simple language

  • 1. Learn BI, Analytics and Big Data Module: Normalization
  • 2. Normalization BIWHIZ Normalization is a set of rules to allocate data to tables in such a way as to minimize the redundancy and to minimize certain anomalies related to insert, delete and update of data. BIWHIZ 2
  • 3. Normalization BIWHIZ Anomalies A major objective of data normalization is to avoid modification anomalies. These come in three flavors: • An insertion anomaly is a failure to place information into all the places in the database. In a properly normalized database, information about a new entry needs to be inserted into only one place in the database. • A deletion anomaly is a failure to remove information about an existing database entry from all places. In a properly normalized database, the entry needs to be deleted from only one. • A update anomaly is a failure to update information about an existing database entry from all places. All three kinds of anomalies are highly undesirable, since their occurrence constitutes corruption of the database. BIWHIZ 3
  • 4. Normalization BIWHIZ First Normal Form • A Relations is said to be in First Normal Form (1NF) when it contains no multi-valued attribute, i.e. every attribute must contain at most one data value. • In other words a table is in first normal form if all the key attributes have been defined and it contains no repeating groups. BIWHIZ 4
  • 5. Normalization First Normal Form Example: Let us assume an ORDER table as below: BIWHIZ ORDER order_id customer_id product1 product2 product3 123 456 abc1 def1 ghi1 456 789 abc2 This structure creates the following problems: •Order 123 has no room for more than 3 products. •Order 456 has wasted space for product2 and product3. BIWHIZ 5
  • 6. Normalization BIWHIZ First Normal Form In order to create a table that is in first normal form we must extract the repeating groups and place them in a separate table. We have removed 'product1', 'product2' and 'product3', so there are no repeating groups. 6 ORDER order_id customer_id 123 456 456 789 ORDER_LINE order_id product 123 abc1 123 def1 123 ghi1 456 abc2
  • 7. Normalization BIWHIZ Second Normal Form A relation is said to be in 2nd Normal Form if • The relation is in 1st Normal Form • Every non key attribute is fully functionally dependent on the whole of the primary key (i.e. there are no partial dependencies). 1. Anomalies can occur when attributes are dependent on only part of a BIWHIZ 7 multi-attribute (composite) key. 2. A relation is in second normal form when all non-key attributes are dependent on the whole key. That is, no attribute is dependent on only a part of the key. 3. Any relation having a key with a single attribute is in second normal form.
  • 8. Normalization Second Normal Form Take the following table structure as an example: order(order_id, cust_id, cust_address, cust_contact, order_date, order_total) BIWHIZ Here we should realize that cust_address and cust_contact are functionally dependent on cust_id but not on order_id, therefore they are not dependent on the whole key. To make this table 2NF these attributes must be removed and placed somewhere else. order_cust(order_id, cust_id, order_date, order_total) customer(cust_id, cust_address, cust_contact) BIWHIZ 8
  • 9. Normalization BIWHIZ Second Normal Form So what problems can occur if we do not make it into 2nd Normal Form? It can result into Update anomaly: If you want to update the address of a customer, need to update in all orders made by this customer, if update is missed at any place then data will be inconsistent. Insert anomaly: There is no way to add a customer information he he/she has not made any order. BIWHIZ 9
  • 10. Normalization BIWHIZ Third Normal Form A relation is said to be in Third Normal Form if • The relation is in Second Normal Form • There is no transitive dependency (that is, all the non-key attributes depend only on the primary key) In other words, A relation is in 3NF when 'All non-key attributes are dependent on the key, the whole key and nothing but the key'. BIWHIZ 10
  • 11. Normalization BIWHIZ Third Normal Form An example of a 2NF table that fails to meet the requirements of 3NF is: BIWHIZ 11 Tournament Winners Tournament Year Winner Winner Date of Birth Indiana Invitational 1998 Al Fredrickson 21 July 1975 Cleveland Open 1999 Bob Albertson 28 September 1968 Des Moines 1999 Al Fredrickson 21 July 1975 Masters Indiana Invitational 1999 Chip Masterson 14 March 1977
  • 12. Normalization BIWHIZ Third Normal Form • Because each row in the table needs to tell us who won a particular Tournament in a particular Year, the composite key {Tournament, Year} is a minimal set of attributes guaranteed to uniquely identify a row. That is, {Tournament, Year} is a candidate key for the table. • The breach of 3NF occurs because the non-prime attribute Winner Date of Birth is transitively dependent on the candidate key {Tournament, Year} via the non-prime attribute Winner. The fact that Winner Date of Birth is functionally dependent on Winner makes the table vulnerable to logical inconsistencies, as there is nothing to stop the same person from being shown with different dates of birth on different records. BIWHIZ 12
  • 13. Normalization BIWHIZ Third Normal Form In order to express the same facts without violating 3NF, it is necessary to split the table into two: Tournament Winners Tournament Year Winner Indiana Invitational 1998 Al Fredrickson Cleveland Open 1999 Bob Albertson Des Moines Masters 1999 Al Fredrickson Indiana Invitational 1999 Chip Masterson Winner Dates of Birth Winner Date of Birth Chip Masterson 14 March 1977 Al Fredrickson 21 July 1975 Bob Albertson 28 September 1968 BIWHIZ 13
  • 14. Normalization BIWHIZ So we may ask what is the difference between 2nd Normal Form and 3rd Normal Form in these two examples? In Order example, the customer address and customer contact is part of the Order information as these values might be needed for delivery purpose so they are dependent on part of primary keys. In Winner example, date of birth is not needed for the transaction(win or loss ) , this is just an extra information which is dependent only on Winner, nothing to do with a win or loss. BIWHIZ 14
  • 15. Normalization Boyce-Code Normal Form (BCNF) A relation is said to be in BCNF if • The relation is in Third Normal Form • And every determinant is a candidate key. BIWHIZ BIWHIZ 15
  • 16. Normalization BIWHIZ Boyce-Code Normal Form (BCNF) • Anomalies can occur in relations in 3NF if there is a composite key in which part of that key has a determinant which is not itself a candidate key. • This can be expressed as R(A,B,C), C A where: – The relation contains attributes A, B and C. – A and B form a candidate key. – C is the determinant for A (A is functionally dependent on C). – C is not part of any key. BIWHIZ 16
  • 17. Normalization Boyce-Code Normal Form (BCNF) Take the following table structure as an example: • schedule(campus, course, class, time, building) • Take the following sample data: BIWHIZ campus course class time building 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 BIWHIZ 17
  • 18. Normalization BIWHIZ Boyce-Code Normal Form (BCNF) Note that no two buildings on any of the university campuses have the same name, thus BUILDING CAMPUS. As the determinant is not a candidate key this table is NOT in Boyce-Codd normal form. campus course class time building 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 BIWHIZ 18
  • 19. Normalization BIWHIZ Boyce-Code Normal Form (BCNF) • This table should be decomposed into the following relations: • R1(course, class, building, time) • R2(building, campus) BIWHIZ 19
  • 20. Normalization BIWHIZ Boyce-Code Normal Form (BCNF) What if we do not apply BCNF form?? Every time when you want to update Campus and Building you have to check the other one and make a corresponding update on that as well. This can result in update anomaly. BIWHIZ 20
  • 21. Normalization BIWHIZ Fourth Normal Form A table is in fourth normal form (4NF) if and only if it is in BCNF and contains no more than one multi-valued dependency. • Anomalies can occur in relations in BCNF if there is more than one multi-valued dependency. • If A-- >> B and A-- >> C but B and C are unrelated, ie A - - >>(B,C) is false, then we have more than one multi-valued dependency. BIWHIZ 21
  • 22. Normalization Fourth Normal Form Take the following table structure as an example: info(employee#, skills, hobbies) Take the following sample data: BIWHIZ 22 employee# skills hobbies 1 Programming Golf 1 Programming Bowling 1 Analysis Golf 1 Analysis Bowling 2 Analysis Golf 2 Analysis Gardening 2 Management Golf 2 Management Gardening
  • 23. Normalization BIWHIZ Fourth Normal Form Exercise: Try adding a new hobby?? This table is difficult to maintain since adding a new hobby requires multiple new rows corresponding to each skill. This problem is created by the pair of multi-valued dependencies EMPLOYEE# -- >>SKILLS and EMPLOYEE#-- >>HOBBIES. A much better alternative would be to decompose INFO into two relations: • skills(employee#, skill) • hobbies(employee#, hobby) BIWHIZ 23
  • 24. Normalization BIWHIZ Fifth Normal Form A table is in fifth normal form (5NF) or Projection-Join Normal Form (PJNF) if it is in 4NF and it cannot have a lossless decomposition into any number of smaller tables. In another words , if we try to decompose it further then we will not be able to join them back and get the original table. (4th and 5th Normal Forms are applicable for Key-Only tables so there is no question of looking at 1st, 2nd, 3rd or BCNF normal forms, they are already there) BIWHIZ 24
  • 25. Normalization BIWHIZ Fifth Normal Form Take the following table structure as an example: buying(buyer, vendor, item) This is used to track buyers, what they buy, and from whom they buy. Take the following sample data: BIWHIZ 25
  • 26. Normalization BIWHIZ buyer vendor item Sally Liz Claiborne Bags Mary Liz Claiborne Bags Sally Jordach Jeans Mary Jordach Jeans Sally Jordach Sneakers BIWHIZ 26 Fifth Normal Form The question is, what do you do if Claiborne starts to sell Jeans? How many rows must you create to record this fact? The problem is there are pairwise cyclical dependencies in the primary key. That is, in order to determine the item you must know the buyer and vendor, and to determine the vendor you must know the buyer and the item, and finally to know the buyer you must know the vendor and the item. The solution is to break this one table into three tables; Buyer-Vendor, Buyer-Item, and Vendor-Item.
  • 27. Normalization BIWHIZ BIWHIZ 27 Fifth Normal Form buyer vendor Sally Liz Claiborne Mary Liz Claiborne Sally Jordach Mary Jordach buyer item Sally Bags Mary Bags Sally Jeans Mary Jeans Sally Sneakers vendor item Liz Claiborne Bags Jordach Jeans Jordach Sneakers