SlideShare a Scribd company logo
1 of 16
Form Normalisation
Normalisation
Normalisation is the process of identifying and
eliminating data anomalies and redundancies,
thereby improving data integrity and efficiency
in a relational database. This process is designed
to remove repeated data and improve database
design.
Normalisation
What does that mean?
Normalisation
Basically we are making a database where –
1. Records are unique – So two people named John
Smith won’t break the database
2. We aren’t doubling up data – So if we update
something we only need to do it in one place
3. We can add data without creating empty fields
4. We can delete data without losing other data we
would like to keep
What happens in Normalisation?
During normalisation a relation is split into a
number of smaller tables suitable for
implementation in a relational database.
Microsoft Xbox 1S $399 Sony PlayStation 4 $509 $148
Lets look at an example.
EB Games is a store that sells a variety of consoles
for example –
Here are EB games sales records.
Cust Name Item Shipping
Address
Supplier Supplier
Phone
Price
John Smith XBox One 35 Palm St,
Melville
Microsoft (08) BUY-
XBOX
$399
Roger Banks Playstation 4 47 Campus
Rd, Murdoch
Sony (08) BUY-
SONY
$509
Evan Wilson XBox One, PS
Vita
38 Rock Av,
Coogee
Wholesale Toll Free $547
John Smith Playstation 4 47 Campus
Rd, Murdoch
Sony (08) BUY-
SONY
$509
1stNormal Form
1. Each cell to be Single valued
2. Entries in a column are same type
3. Rows uniquely identified – Add Unique ID, or Add more columns to make
unique
Cust Name Item Shipping
Address
Supplier Supplier
Phone
Price
John Smith XBox One 35 Palm St,
Melville
Microsoft (08) BUY-
XBOX
$399
Roger Banks Playstation 4 47 Campus
Rd, Murdoch
Sony (08) BUY-
SONY
$509
Evan Wilson XBox One, PS
Vita
38 Rock Av,
Coogee
Wholesale Toll Free $547
John Smith Playstation 4 47 Campus
Rd, Murdoch
Sony (08) BUY-
SONY
$509
1stNormal Form
1. Each cell to be Single valued
2. Entries in a column are same type
3. Rows uniquely identified – Add Unique ID, or Add more columns to make
unique
Cust Name Item Shipping
Address
Supplier Supplier
Phone
Price
John Smith XBox One 35 Palm St,
Melville
Microsoft (08) BUY-
XBOX
$399
Roger Banks Playstation 4 47 Campus
Rd, Murdoch
Sony (08) BUY-
SONY
$509
Evan Wilson XBox One, PS
Vita
38 Rock Av,
Coogee
Wholesale Toll Free $547
John Smith Playstation 4 47 Campus
Rd, Murdoch
Sony (08) BUY-
SONY
$509
2. Not Same Type1. Not a Single Value
3. Row uniquely Identified *doesn’t account for people with the same name*
So here is that table Normalised to the 1st Normal Form. The colour is just to
highlight the changes.
Primary
Key
Cust ID Cust Name Item Shipping
Address
Supplier Supplier
Phone
Price
1000 John Smith XBox One 35 Palm St,
Melville
Microsoft (08) BUY-
XBOX
$399
1001 Roger Banks Playstation
4
47 Campus
Rd,
Murdoch
Sony (08) BUY-
SONY
$509
1002 Evan Wilson XBox One 38 Rock Av,
Coogee
Microsoft (08) BUY-
XBOX
$399
1002 Evan Wilson PS Vita 38 Rock Av,
Coogee
Sony (08) BUY-
SONY
$148
1003 John Smith Playstation
4
47 Campus
Rd,
Murdoch
Sony (08) BUY-
SONY
$509
1. So to get to single values Evan Wilson’s entry was separated to two entries one for the XBox
and one for the Vita.
2. Wholesale and Toll Free were removed and replaced with proper values that reflect the
information expected.
3. A Primary Key (Cust ID) was added to make sure each row is uniquely identified. So we now
see clearly that the two John Smiths are two different customers.
2nd Normal Form
1. All attributes (Non-Key Columns) dependant on the key.
So which attributes are not dependant on Cust ID in previous table?
Primary
Key
Cust ID Cust Name Item Shipping
Address
Supplier Supplier
Phone
Price
1000 John Smith XBox One 35 Palm St,
Melville
Microsoft (08) BUY-
XBOX
$399
1001 Roger Banks Playstation
4
47 Campus
Rd,
Murdoch
Sony (08) BUY-
SONY
$509
1002 Evan Wilson XBox One 38 Rock Av,
Coogee
Microsoft (08) BUY-
XBOX
$399
1002 Evan Wilson PS Vita 38 Rock Av,
Coogee
Sony (08) BUY-
SONY
$148
1003 John Smith Playstation
4
47 Campus
Rd,
Murdoch
Sony (08) BUY-
SONY
$509
2nd Normal Form
1. All attributes (Non-Key Columns) dependant on the key.
So which attributes are not dependant on Cust ID in previous table?
Primary
Key
Cust ID Cust Name Item Shipping
Address
Supplier Supplier
Phone
Price
1000 John Smith XBox One 35 Palm St,
Melville
Microsoft (08) BUY-
XBOX
$399
1001 Roger Banks Playstation
4
47 Campus
Rd,
Murdoch
Sony (08) BUY-
SONY
$509
1002 Evan Wilson XBox One 38 Rock Av,
Coogee
Microsoft (08) BUY-
XBOX
$399
1002 Evan Wilson PS Vita 38 Rock Av,
Coogee
Sony (08) BUY-
SONY
$148
1003 John Smith Playstation
4
47 Campus
Rd,
Murdoch
Sony (08) BUY-
SONY
$509
The Supplier, Supplier Phone and Price and not dependant on the key. They are independent to the person buying the
console. Microsoft is the supplier of XBox regardless of who is buying it.
So we will take these items out into their own table.
I have used the name of the item as a primary key to make it a little clearer what is going on. You
probably wouldn’t do this in real life, there would be a stock number associated with these items.
Primary
Key
Primary
Key
Cust ID Cust Name Shipping
Address
Stock ID Supplier Supplier
Phone
Price
1000 John Smith 35 Palm St,
Melville
XBox One Microsoft (08) BUY-
XBOX
$399
1001 Roger
Banks
47 Campus Rd,
Murdoch
PlayStation 4 Sony (08) BUY-
SONY
$509
1002 Evan
Wilson
38 Rock Av,
Coogee
PS Vita Sony (08) BUY-
SONY
$148
1003 John Smith 47 Campus Rd,
Murdoch
So we have the non-dependant data out but now we can’t see who bought what so
we add table called a junction table to join them together.
I have used the name of the item as a primary key to make it a little clearer what is going on. You
probably wouldn’t do this in real life, there would be a stock number associated with these items.
Primary
Key
Primary
Key
Cust ID Cust Name Shipping
Address
Stock ID Supplier Supplier
Phone
Price
1000 John Smith 35 Palm St,
Melville
XBox One Microsoft (08) BUY-
XBOX
$399
1001 Roger
Banks
47 Campus Rd,
Murdoch
PlayStation 4 Sony (08) BUY-
SONY
$509
1002 Evan
Wilson
38 Rock Av,
Coogee
PS Vita Sony (08) BUY-
SONY
$148
1003 John Smith 47 Campus Rd,
Murdoch
So we have the non-dependant data out but now we can’t see who bought what so
we add table called a junction table to join them together.
Primary Key Primary Key
Cust ID Stock ID
1000 XBox One
1001 PlayStation 4
1002 XBox One
1002 PS Vita
1003 PlayStation 4
3rd Normal Form
1. All fields (columns) can be determined only but the key in the table and no other column.
What filed can be determined by a column other than the key in our example?
Primary
Key
Primary
Key
Cust ID Cust Name Shipping
Address
Stock ID Supplier Supplier
Phone
Price
1000 John Smith 35 Palm St,
Melville
XBox One Microsoft (08) BUY-
XBOX
$399
1001 Roger
Banks
47 Campus Rd,
Murdoch
PlayStation 4 Sony (08) BUY-
SONY
$509
1002 Evan
Wilson
38 Rock Av,
Coogee
PS Vita Sony (08) BUY-
SONY
$148
1003 John Smith 47 Campus Rd,
Murdoch
Primary Key Primary Key
Cust ID Stock ID
1000 XBox One
1001 PlayStation 4
1002 XBox One
1002 PS Vita
1003 PlayStation 4
3rd Normal Form
1. All fields (columns) can be determined only but the key in the table and no other column.
In our example the Supplier Phone is dependent on the supplier. If we left this and the supplier changed
their number we would need to change it in multiple places.
Primary
Key
Primary
Key
Cust ID Cust Name Shipping
Address
Stock ID Supplier Supplier
Phone
Price
1000 John Smith 35 Palm St,
Melville
XBox One Microsoft (08) BUY-
XBOX
$399
1001 Roger
Banks
47 Campus Rd,
Murdoch
PlayStation 4 Sony (08) BUY-
SONY
$509
1002 Evan
Wilson
38 Rock Av,
Coogee
PS Vita Sony (08) BUY-
SONY
$148
1003 John Smith 47 Campus Rd,
Murdoch
Primary Key Primary Key
Cust ID Stock ID
1000 XBox One
1001 PlayStation 4
1002 XBox One
1002 PS Vita
1003 PlayStation 4
So we pull out the Supplier
making it a Primary Key in it’s
own table and a Foreign key in
Stock Table. Which will means
you can only add suppliers from
the Supplier Table in the Stock
Table.
3rd Normal Form
1. All fields (columns) can be determined only but the key in the table and no other column.
So we pull out the Supplier making it a Primary Key in it’s own table and a Foreign key in Stock
Table. Which will means you can only add suppliers from the Supplier Table in the Stock Table.
Primary
Key
Primary
Key
Cust ID Cust Name Shipping
Address
Stock ID Supplier Price
1000 John Smith 35 Palm St,
Melville
XBox One Microsoft $399
1001 Roger
Banks
47 Campus Rd,
Murdoch
PlayStation 4 Sony $509
1002 Evan
Wilson
38 Rock Av,
Coogee
PS Vita Sony $148
1003 John Smith 47 Campus Rd,
Murdoch
Primary Key Primary Key
Cust ID Stock ID
1000 XBox One
1001 PlayStation 4
1002 XBox One
1002 PS Vita
1003 PlayStation 4
Primary Key
Supplier Supplier
Phone
Microsoft (08) BUY-
XBOX
Sony (08) BUY-
SONY
And we are done! Yes
there is 4th Normal form
but we don’t need to
know about that.

More Related Content

More from Mark Rotondella

Computer Hardware Basics
Computer Hardware BasicsComputer Hardware Basics
Computer Hardware BasicsMark Rotondella
 
History of Video Games 90s till 00
History of Video Games 90s till 00History of Video Games 90s till 00
History of Video Games 90s till 00Mark Rotondella
 
Design Principles and Elements
Design Principles and ElementsDesign Principles and Elements
Design Principles and ElementsMark Rotondella
 
History of Video Games up to 90s
History of Video Games up to 90sHistory of Video Games up to 90s
History of Video Games up to 90sMark Rotondella
 
Sustainability in Design
Sustainability in DesignSustainability in Design
Sustainability in DesignMark Rotondella
 
Goldern Ratio and the Rule of Thirds
Goldern Ratio and the Rule of ThirdsGoldern Ratio and the Rule of Thirds
Goldern Ratio and the Rule of ThirdsMark Rotondella
 
Occupational Health and Safety (Australia)
Occupational Health and Safety (Australia)Occupational Health and Safety (Australia)
Occupational Health and Safety (Australia)Mark Rotondella
 
Shannon and Weaver Communication Model
Shannon and Weaver Communication ModelShannon and Weaver Communication Model
Shannon and Weaver Communication ModelMark Rotondella
 

More from Mark Rotondella (13)

Computer Networks
Computer NetworksComputer Networks
Computer Networks
 
Computer Hardware Basics
Computer Hardware BasicsComputer Hardware Basics
Computer Hardware Basics
 
Great People in IT
Great People in ITGreat People in IT
Great People in IT
 
File Formats
File FormatsFile Formats
File Formats
 
Data management
Data managementData management
Data management
 
History of Video Games 90s till 00
History of Video Games 90s till 00History of Video Games 90s till 00
History of Video Games 90s till 00
 
Design Principles and Elements
Design Principles and ElementsDesign Principles and Elements
Design Principles and Elements
 
History of Video Games up to 90s
History of Video Games up to 90sHistory of Video Games up to 90s
History of Video Games up to 90s
 
Sustainability in Design
Sustainability in DesignSustainability in Design
Sustainability in Design
 
Goldern Ratio and the Rule of Thirds
Goldern Ratio and the Rule of ThirdsGoldern Ratio and the Rule of Thirds
Goldern Ratio and the Rule of Thirds
 
Occupational Health and Safety (Australia)
Occupational Health and Safety (Australia)Occupational Health and Safety (Australia)
Occupational Health and Safety (Australia)
 
Shannon and Weaver Communication Model
Shannon and Weaver Communication ModelShannon and Weaver Communication Model
Shannon and Weaver Communication Model
 
Key Movements in Design
Key Movements in DesignKey Movements in Design
Key Movements in Design
 

Recently uploaded

Biometric Authentication: The Evolution, Applications, Benefits and Challenge...
Biometric Authentication: The Evolution, Applications, Benefits and Challenge...Biometric Authentication: The Evolution, Applications, Benefits and Challenge...
Biometric Authentication: The Evolution, Applications, Benefits and Challenge...GQ Research
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...Florian Roscheck
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样vhwb25kk
 
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptxNLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptxBoston Institute of Analytics
 
Top 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In QueensTop 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In Queensdataanalyticsqueen03
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDRafezzaman
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhijennyeacort
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 
While-For-loop in python used in college
While-For-loop in python used in collegeWhile-For-loop in python used in college
While-For-loop in python used in collegessuser7a7cd61
 
Semantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptxSemantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptxMike Bennett
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...limedy534
 
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...Amil Baba Dawood bangali
 
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSINGmarianagonzalez07
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degreeyuu sss
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Seán Kennedy
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Cantervoginip
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一F sss
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 

Recently uploaded (20)

Biometric Authentication: The Evolution, Applications, Benefits and Challenge...
Biometric Authentication: The Evolution, Applications, Benefits and Challenge...Biometric Authentication: The Evolution, Applications, Benefits and Challenge...
Biometric Authentication: The Evolution, Applications, Benefits and Challenge...
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
 
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptxNLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
 
Top 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In QueensTop 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In Queens
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 
While-For-loop in python used in college
While-For-loop in python used in collegeWhile-For-loop in python used in college
While-For-loop in python used in college
 
Semantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptxSemantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptx
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
 
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
 
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Canter
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 

Database Normalisation Process

  • 2. Normalisation Normalisation is the process of identifying and eliminating data anomalies and redundancies, thereby improving data integrity and efficiency in a relational database. This process is designed to remove repeated data and improve database design.
  • 4. Normalisation Basically we are making a database where – 1. Records are unique – So two people named John Smith won’t break the database 2. We aren’t doubling up data – So if we update something we only need to do it in one place 3. We can add data without creating empty fields 4. We can delete data without losing other data we would like to keep
  • 5. What happens in Normalisation? During normalisation a relation is split into a number of smaller tables suitable for implementation in a relational database.
  • 6. Microsoft Xbox 1S $399 Sony PlayStation 4 $509 $148 Lets look at an example. EB Games is a store that sells a variety of consoles for example – Here are EB games sales records. Cust Name Item Shipping Address Supplier Supplier Phone Price John Smith XBox One 35 Palm St, Melville Microsoft (08) BUY- XBOX $399 Roger Banks Playstation 4 47 Campus Rd, Murdoch Sony (08) BUY- SONY $509 Evan Wilson XBox One, PS Vita 38 Rock Av, Coogee Wholesale Toll Free $547 John Smith Playstation 4 47 Campus Rd, Murdoch Sony (08) BUY- SONY $509
  • 7. 1stNormal Form 1. Each cell to be Single valued 2. Entries in a column are same type 3. Rows uniquely identified – Add Unique ID, or Add more columns to make unique Cust Name Item Shipping Address Supplier Supplier Phone Price John Smith XBox One 35 Palm St, Melville Microsoft (08) BUY- XBOX $399 Roger Banks Playstation 4 47 Campus Rd, Murdoch Sony (08) BUY- SONY $509 Evan Wilson XBox One, PS Vita 38 Rock Av, Coogee Wholesale Toll Free $547 John Smith Playstation 4 47 Campus Rd, Murdoch Sony (08) BUY- SONY $509
  • 8. 1stNormal Form 1. Each cell to be Single valued 2. Entries in a column are same type 3. Rows uniquely identified – Add Unique ID, or Add more columns to make unique Cust Name Item Shipping Address Supplier Supplier Phone Price John Smith XBox One 35 Palm St, Melville Microsoft (08) BUY- XBOX $399 Roger Banks Playstation 4 47 Campus Rd, Murdoch Sony (08) BUY- SONY $509 Evan Wilson XBox One, PS Vita 38 Rock Av, Coogee Wholesale Toll Free $547 John Smith Playstation 4 47 Campus Rd, Murdoch Sony (08) BUY- SONY $509 2. Not Same Type1. Not a Single Value 3. Row uniquely Identified *doesn’t account for people with the same name*
  • 9. So here is that table Normalised to the 1st Normal Form. The colour is just to highlight the changes. Primary Key Cust ID Cust Name Item Shipping Address Supplier Supplier Phone Price 1000 John Smith XBox One 35 Palm St, Melville Microsoft (08) BUY- XBOX $399 1001 Roger Banks Playstation 4 47 Campus Rd, Murdoch Sony (08) BUY- SONY $509 1002 Evan Wilson XBox One 38 Rock Av, Coogee Microsoft (08) BUY- XBOX $399 1002 Evan Wilson PS Vita 38 Rock Av, Coogee Sony (08) BUY- SONY $148 1003 John Smith Playstation 4 47 Campus Rd, Murdoch Sony (08) BUY- SONY $509 1. So to get to single values Evan Wilson’s entry was separated to two entries one for the XBox and one for the Vita. 2. Wholesale and Toll Free were removed and replaced with proper values that reflect the information expected. 3. A Primary Key (Cust ID) was added to make sure each row is uniquely identified. So we now see clearly that the two John Smiths are two different customers.
  • 10. 2nd Normal Form 1. All attributes (Non-Key Columns) dependant on the key. So which attributes are not dependant on Cust ID in previous table? Primary Key Cust ID Cust Name Item Shipping Address Supplier Supplier Phone Price 1000 John Smith XBox One 35 Palm St, Melville Microsoft (08) BUY- XBOX $399 1001 Roger Banks Playstation 4 47 Campus Rd, Murdoch Sony (08) BUY- SONY $509 1002 Evan Wilson XBox One 38 Rock Av, Coogee Microsoft (08) BUY- XBOX $399 1002 Evan Wilson PS Vita 38 Rock Av, Coogee Sony (08) BUY- SONY $148 1003 John Smith Playstation 4 47 Campus Rd, Murdoch Sony (08) BUY- SONY $509
  • 11. 2nd Normal Form 1. All attributes (Non-Key Columns) dependant on the key. So which attributes are not dependant on Cust ID in previous table? Primary Key Cust ID Cust Name Item Shipping Address Supplier Supplier Phone Price 1000 John Smith XBox One 35 Palm St, Melville Microsoft (08) BUY- XBOX $399 1001 Roger Banks Playstation 4 47 Campus Rd, Murdoch Sony (08) BUY- SONY $509 1002 Evan Wilson XBox One 38 Rock Av, Coogee Microsoft (08) BUY- XBOX $399 1002 Evan Wilson PS Vita 38 Rock Av, Coogee Sony (08) BUY- SONY $148 1003 John Smith Playstation 4 47 Campus Rd, Murdoch Sony (08) BUY- SONY $509 The Supplier, Supplier Phone and Price and not dependant on the key. They are independent to the person buying the console. Microsoft is the supplier of XBox regardless of who is buying it. So we will take these items out into their own table.
  • 12. I have used the name of the item as a primary key to make it a little clearer what is going on. You probably wouldn’t do this in real life, there would be a stock number associated with these items. Primary Key Primary Key Cust ID Cust Name Shipping Address Stock ID Supplier Supplier Phone Price 1000 John Smith 35 Palm St, Melville XBox One Microsoft (08) BUY- XBOX $399 1001 Roger Banks 47 Campus Rd, Murdoch PlayStation 4 Sony (08) BUY- SONY $509 1002 Evan Wilson 38 Rock Av, Coogee PS Vita Sony (08) BUY- SONY $148 1003 John Smith 47 Campus Rd, Murdoch So we have the non-dependant data out but now we can’t see who bought what so we add table called a junction table to join them together.
  • 13. I have used the name of the item as a primary key to make it a little clearer what is going on. You probably wouldn’t do this in real life, there would be a stock number associated with these items. Primary Key Primary Key Cust ID Cust Name Shipping Address Stock ID Supplier Supplier Phone Price 1000 John Smith 35 Palm St, Melville XBox One Microsoft (08) BUY- XBOX $399 1001 Roger Banks 47 Campus Rd, Murdoch PlayStation 4 Sony (08) BUY- SONY $509 1002 Evan Wilson 38 Rock Av, Coogee PS Vita Sony (08) BUY- SONY $148 1003 John Smith 47 Campus Rd, Murdoch So we have the non-dependant data out but now we can’t see who bought what so we add table called a junction table to join them together. Primary Key Primary Key Cust ID Stock ID 1000 XBox One 1001 PlayStation 4 1002 XBox One 1002 PS Vita 1003 PlayStation 4
  • 14. 3rd Normal Form 1. All fields (columns) can be determined only but the key in the table and no other column. What filed can be determined by a column other than the key in our example? Primary Key Primary Key Cust ID Cust Name Shipping Address Stock ID Supplier Supplier Phone Price 1000 John Smith 35 Palm St, Melville XBox One Microsoft (08) BUY- XBOX $399 1001 Roger Banks 47 Campus Rd, Murdoch PlayStation 4 Sony (08) BUY- SONY $509 1002 Evan Wilson 38 Rock Av, Coogee PS Vita Sony (08) BUY- SONY $148 1003 John Smith 47 Campus Rd, Murdoch Primary Key Primary Key Cust ID Stock ID 1000 XBox One 1001 PlayStation 4 1002 XBox One 1002 PS Vita 1003 PlayStation 4
  • 15. 3rd Normal Form 1. All fields (columns) can be determined only but the key in the table and no other column. In our example the Supplier Phone is dependent on the supplier. If we left this and the supplier changed their number we would need to change it in multiple places. Primary Key Primary Key Cust ID Cust Name Shipping Address Stock ID Supplier Supplier Phone Price 1000 John Smith 35 Palm St, Melville XBox One Microsoft (08) BUY- XBOX $399 1001 Roger Banks 47 Campus Rd, Murdoch PlayStation 4 Sony (08) BUY- SONY $509 1002 Evan Wilson 38 Rock Av, Coogee PS Vita Sony (08) BUY- SONY $148 1003 John Smith 47 Campus Rd, Murdoch Primary Key Primary Key Cust ID Stock ID 1000 XBox One 1001 PlayStation 4 1002 XBox One 1002 PS Vita 1003 PlayStation 4 So we pull out the Supplier making it a Primary Key in it’s own table and a Foreign key in Stock Table. Which will means you can only add suppliers from the Supplier Table in the Stock Table.
  • 16. 3rd Normal Form 1. All fields (columns) can be determined only but the key in the table and no other column. So we pull out the Supplier making it a Primary Key in it’s own table and a Foreign key in Stock Table. Which will means you can only add suppliers from the Supplier Table in the Stock Table. Primary Key Primary Key Cust ID Cust Name Shipping Address Stock ID Supplier Price 1000 John Smith 35 Palm St, Melville XBox One Microsoft $399 1001 Roger Banks 47 Campus Rd, Murdoch PlayStation 4 Sony $509 1002 Evan Wilson 38 Rock Av, Coogee PS Vita Sony $148 1003 John Smith 47 Campus Rd, Murdoch Primary Key Primary Key Cust ID Stock ID 1000 XBox One 1001 PlayStation 4 1002 XBox One 1002 PS Vita 1003 PlayStation 4 Primary Key Supplier Supplier Phone Microsoft (08) BUY- XBOX Sony (08) BUY- SONY And we are done! Yes there is 4th Normal form but we don’t need to know about that.