SlideShare a Scribd company logo
Database Normalization PHP Quebec 2005 Mike Hillyer – MySQL AB
About Me ,[object Object],[object Object],[object Object],[object Object],[object Object],Mike Hillyer, BSc
About You ,[object Object],[object Object],[object Object],[object Object],[object Object],How many of you…
About This Session ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What Is Database Normalization? ,[object Object],[object Object],[object Object],[object Object]
What are the Benefits of Database Normalization? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What are the Normal Forms? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Our Table [email_address] 403-555-1111 403-555-1919 Ray Smith [email_address] [email_address] 403-555-1313 403-555-1919 Tom Jensen [email_address] [email_address] 403-555-1919 403-555-1717 Mike Hillyer email2 email1 phone2 phone1 name
First Normal Form ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
One Solution ,[object Object],[object Object],[object Object],Smith Smith Jensen Jensen Hillyer Hillyer last_name 403-555-1111 Ray [email_address] 403-555-1313 Tom [email_address] 403-555-1919 Mike [email_address] 403-555-1919 Ray [email_address] 403-555-1919 Tom [email_address] 403-555-1717 Mike email phone first_name
Satisfying 1NF
Forming Relationships ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Joining Tables
Our User Table Smith Jensen Hillyer last_name Documentation CPNS Ray Finance CPNS Tom Documentation MySQL Mike department company first_name
Second Normal Form ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Satisfying 2NF
Third Normal Form ,[object Object],[object Object],[object Object],[object Object],[object Object]
Satisfying 3NF
Finding Balance
Joining Tables ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
De-Normalizing Tables ,[object Object],[object Object],[object Object],[object Object]
Conclusion ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
QUESTIONS? Feel free to ask now or find me after this session!
Book Draw! Stick around and win a book!

More Related Content

What's hot

B+tree
B+treeB+tree
B+tree
jasscheema
 
Types Of Join In Sql Server - Join With Example In Sql Server
Types Of Join In Sql Server - Join With Example In Sql ServerTypes Of Join In Sql Server - Join With Example In Sql Server
Types Of Join In Sql Server - Join With Example In Sql Server
programmings guru
 
B+tree Data structures presentation
B+tree Data structures presentationB+tree Data structures presentation
B+tree Data structures presentation
Muhammad Bilal Khan
 
Excel text functions
Excel text functionsExcel text functions
Excel text functions
Kevin McLogan
 
stem and leaf diagrams
 stem and leaf diagrams stem and leaf diagrams
stem and leaf diagrams
blockmath
 
Boxplot
BoxplotBoxplot
Boxplot
Kelly Jans
 
joins and subqueries in big data analysis
joins and subqueries in big data analysisjoins and subqueries in big data analysis
joins and subqueries in big data analysis
SanSan149
 
Bootcamp sql fundamentals bootcamp_part4
Bootcamp   sql fundamentals  bootcamp_part4Bootcamp   sql fundamentals  bootcamp_part4
Bootcamp sql fundamentals bootcamp_part4
varunbhatt23
 
Inner Pages Research
Inner Pages ResearchInner Pages Research
Inner Pages Research
os99sk8
 
DATASTORAGE.pptx
DATASTORAGE.pptxDATASTORAGE.pptx
DATASTORAGE.pptx
Neheurevathy
 
DATASTORAGE.pdf
DATASTORAGE.pdfDATASTORAGE.pdf
DATASTORAGE.pdf
Neheurevathy
 
Stem & leaf plots + histograms
Stem & leaf plots + histogramsStem & leaf plots + histograms
Stem & leaf plots + histograms
ListeningDaisy
 
Joins in dbms and types
Joins in dbms and typesJoins in dbms and types
Joins in dbms and types
university of Gujrat, pakistan
 
Nikhat b+ trees ppt
Nikhat b+ trees pptNikhat b+ trees ppt
Nikhat b+ trees ppt
Nikihat Maniyar
 
Fraction
FractionFraction
Fraction
MDPPrasadini
 

What's hot (15)

B+tree
B+treeB+tree
B+tree
 
Types Of Join In Sql Server - Join With Example In Sql Server
Types Of Join In Sql Server - Join With Example In Sql ServerTypes Of Join In Sql Server - Join With Example In Sql Server
Types Of Join In Sql Server - Join With Example In Sql Server
 
B+tree Data structures presentation
B+tree Data structures presentationB+tree Data structures presentation
B+tree Data structures presentation
 
Excel text functions
Excel text functionsExcel text functions
Excel text functions
 
stem and leaf diagrams
 stem and leaf diagrams stem and leaf diagrams
stem and leaf diagrams
 
Boxplot
BoxplotBoxplot
Boxplot
 
joins and subqueries in big data analysis
joins and subqueries in big data analysisjoins and subqueries in big data analysis
joins and subqueries in big data analysis
 
Bootcamp sql fundamentals bootcamp_part4
Bootcamp   sql fundamentals  bootcamp_part4Bootcamp   sql fundamentals  bootcamp_part4
Bootcamp sql fundamentals bootcamp_part4
 
Inner Pages Research
Inner Pages ResearchInner Pages Research
Inner Pages Research
 
DATASTORAGE.pptx
DATASTORAGE.pptxDATASTORAGE.pptx
DATASTORAGE.pptx
 
DATASTORAGE.pdf
DATASTORAGE.pdfDATASTORAGE.pdf
DATASTORAGE.pdf
 
Stem & leaf plots + histograms
Stem & leaf plots + histogramsStem & leaf plots + histograms
Stem & leaf plots + histograms
 
Joins in dbms and types
Joins in dbms and typesJoins in dbms and types
Joins in dbms and types
 
Nikhat b+ trees ppt
Nikhat b+ trees pptNikhat b+ trees ppt
Nikhat b+ trees ppt
 
Fraction
FractionFraction
Fraction
 

Viewers also liked

Normalisation lesson plan
Normalisation   lesson planNormalisation   lesson plan
Normalisation lesson plan
Mohamed Maguid
 
Sql join
Sql  joinSql  join
Sql join
Vikas Gupta
 
SQL Joins and Query Optimization
SQL Joins and Query OptimizationSQL Joins and Query Optimization
SQL Joins and Query Optimization
Brian Gallagher
 
MS Sql Server: Joining Databases
MS Sql Server: Joining DatabasesMS Sql Server: Joining Databases
MS Sql Server: Joining Databases
DataminingTools Inc
 
A place in the choir
A place in the choirA place in the choir
A place in the choir
Linnea Good
 
Sung
SungSung

Viewers also liked (6)

Normalisation lesson plan
Normalisation   lesson planNormalisation   lesson plan
Normalisation lesson plan
 
Sql join
Sql  joinSql  join
Sql join
 
SQL Joins and Query Optimization
SQL Joins and Query OptimizationSQL Joins and Query Optimization
SQL Joins and Query Optimization
 
MS Sql Server: Joining Databases
MS Sql Server: Joining DatabasesMS Sql Server: Joining Databases
MS Sql Server: Joining Databases
 
A place in the choir
A place in the choirA place in the choir
A place in the choir
 
Sung
SungSung
Sung
 

Similar to Database normalisation

Year 11 DATA PROCESSING 1st Term
Year 11 DATA PROCESSING 1st TermYear 11 DATA PROCESSING 1st Term
Year 11 DATA PROCESSING 1st Term
Isaac-Joseph Olanrewaju
 
Persentation of SAD 2
Persentation of SAD 2Persentation of SAD 2
Persentation of SAD 2
Khaled Salmeen BAzqameh
 
normaliztion
normaliztionnormaliztion
normaliztion
Ramadhani S. Zuberi
 
Database Normalization.docx
Database Normalization.docxDatabase Normalization.docx
Database Normalization.docx
SHARMISTHAlearning
 
Database Design Process
Database Design ProcessDatabase Design Process
Database Design Process
mussawir20
 
Access 05
Access 05Access 05
Access 05
Alexander Babich
 
Intro to Data warehousing lecture 08
Intro to Data warehousing   lecture 08Intro to Data warehousing   lecture 08
Intro to Data warehousing lecture 08
AnwarrChaudary
 
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 | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NFNormalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Biplap Bhattarai
 
Research gadot
Research gadotResearch gadot
Research gadot
Jotham Gadot
 
Normalisation - 2nd normal form
Normalisation - 2nd normal formNormalisation - 2nd normal form
Normalisation - 2nd normal form
college
 
Ms sql server tips 1 0
Ms sql server tips 1 0Ms sql server tips 1 0
Ms sql server tips 1 0
Arman Nasrollahi
 
Ms access tutorial
Ms access tutorialMs access tutorial
Ms access tutorial
minga48
 
Advance sqlite3
Advance sqlite3Advance sqlite3
Advance sqlite3
Raghu nath
 
Normalization Accepted
Normalization AcceptedNormalization Accepted
Normalization Accepted
prasaddurga
 
Feb 2nd Makeup Class
Feb 2nd Makeup ClassFeb 2nd Makeup Class
Feb 2nd Makeup Class
George Saban
 
Data normailazation
Data normailazationData normailazation
Data normailazation
Lalit Kale
 
Normalization
NormalizationNormalization
Normalization
Shakila Mahjabin
 
Lecture 6.pptx
Lecture 6.pptxLecture 6.pptx
Lecture 6.pptx
DilanAlmsa
 

Similar to Database normalisation (20)

Year 11 DATA PROCESSING 1st Term
Year 11 DATA PROCESSING 1st TermYear 11 DATA PROCESSING 1st Term
Year 11 DATA PROCESSING 1st Term
 
Persentation of SAD 2
Persentation of SAD 2Persentation of SAD 2
Persentation of SAD 2
 
normaliztion
normaliztionnormaliztion
normaliztion
 
Database Normalization.docx
Database Normalization.docxDatabase Normalization.docx
Database Normalization.docx
 
Database Design Process
Database Design ProcessDatabase Design Process
Database Design Process
 
Access 05
Access 05Access 05
Access 05
 
Intro to Data warehousing lecture 08
Intro to Data warehousing   lecture 08Intro to Data warehousing   lecture 08
Intro to Data warehousing lecture 08
 
Topics-Ch4Ch5.ppt
Topics-Ch4Ch5.pptTopics-Ch4Ch5.ppt
Topics-Ch4Ch5.ppt
 
Topics-Ch4Ch5.ppt
Topics-Ch4Ch5.pptTopics-Ch4Ch5.ppt
Topics-Ch4Ch5.ppt
 
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NFNormalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
 
Research gadot
Research gadotResearch gadot
Research gadot
 
Normalisation - 2nd normal form
Normalisation - 2nd normal formNormalisation - 2nd normal form
Normalisation - 2nd normal form
 
Ms sql server tips 1 0
Ms sql server tips 1 0Ms sql server tips 1 0
Ms sql server tips 1 0
 
Ms access tutorial
Ms access tutorialMs access tutorial
Ms access tutorial
 
Advance sqlite3
Advance sqlite3Advance sqlite3
Advance sqlite3
 
Normalization Accepted
Normalization AcceptedNormalization Accepted
Normalization Accepted
 
Feb 2nd Makeup Class
Feb 2nd Makeup ClassFeb 2nd Makeup Class
Feb 2nd Makeup Class
 
Data normailazation
Data normailazationData normailazation
Data normailazation
 
Normalization
NormalizationNormalization
Normalization
 
Lecture 6.pptx
Lecture 6.pptxLecture 6.pptx
Lecture 6.pptx
 

More from suresh chaudhari

Adviceforphotos jac
Adviceforphotos jacAdviceforphotos jac
Adviceforphotos jac
suresh chaudhari
 
Chapter2(2)
Chapter2(2)Chapter2(2)
Chapter2(2)
suresh chaudhari
 
Iotsunami
IotsunamiIotsunami
Iotsunami
suresh chaudhari
 
Global warming
Global warmingGlobal warming
Global warming
suresh chaudhari
 
Earthquakes
EarthquakesEarthquakes
Earthquakes
suresh chaudhari
 
Database normalisation
Database normalisationDatabase normalisation
Database normalisation
suresh chaudhari
 

More from suresh chaudhari (6)

Adviceforphotos jac
Adviceforphotos jacAdviceforphotos jac
Adviceforphotos jac
 
Chapter2(2)
Chapter2(2)Chapter2(2)
Chapter2(2)
 
Iotsunami
IotsunamiIotsunami
Iotsunami
 
Global warming
Global warmingGlobal warming
Global warming
 
Earthquakes
EarthquakesEarthquakes
Earthquakes
 
Database normalisation
Database normalisationDatabase normalisation
Database normalisation
 

Recently uploaded

How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
Constructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective CommunicationConstructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective Communication
Chevonnese Chevers Whyte, MBA, B.Sc.
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Leena Ghag-Sakpal
 
math operations ued in python and all used
math operations ued in python and all usedmath operations ued in python and all used
math operations ued in python and all used
ssuser13ffe4
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
BoudhayanBhattachari
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
ZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptxZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptx
dot55audits
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 

Recently uploaded (20)

How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
Constructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective CommunicationConstructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective Communication
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
 
math operations ued in python and all used
math operations ued in python and all usedmath operations ued in python and all used
math operations ued in python and all used
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
ZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptxZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptx
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 

Database normalisation

Editor's Notes

  1. Mike Hillyer Technical writer for MySQL AB, MySQL Core and Pro certified. This session has been delivered to the Lethbridge MySQL Group and will also be delivered at the PHP Quebec conference.
  2. I’m Mike Hillyer from Alberta Canada. Here’s some qualifications for those who are interested.
  3. Those using another DB are forgiven ;) We’ll be started with a look at the most common model, followed by an introduction on a better approach.
  4. If you want to follow along, you can find the slides for this presentation at openwin.org, the article this session was based on is at vbmysql.com
  5. Many new database developers suffer from the ‘spreadsheet syndrome’, creating as few tables as possible, often just a single table. They place dozens of columns in their table, to try and cover every possible piece of data, even though they often leave most columns unfilled for a given row. By contrast database normalization aims to store the smallest amount of info possible in each table, leaving no columns that are filled for just a few of the rows. In fact, in a properly normalized table there should be very few empty(NULL) fields. This is accomplished by restructuring the data into multiple tables, with each table containing a subset of the information.
  6. And hey, odds are you can change more than one column, and you may have more than a million rows.
  7. Normal forms above 3NF are mainly for academics, and are not seen very often in the wild.
  8. Back to original table, our phone columns are redundant, our name field holds more than one piece of info, we have redundant email addresses. And even the cell and pager info is redundant in the sense that they are both phone numbers to reach you at.
  9. We now have three tables. In our phone table, instead of just having the phone number in a column we split it into country code, number, and extension. If we were really ambitious we could even split off the area code, but it depends on what you need to do with the data. Each table has a primary key so that each row can be uniquely identified. The email and phone tables have ID primary keys, and the user also has a user_id. I’ll talk about how to associate these tables next.
  10. Before we relate these tables, lets look at the different types of relationships that exist: In our case, the email table can just contain the user_id from the user table, indicating which user it belongs to. This will be combined with the address itself to form a composite primary key. The phone on the other hand is a many-to-many. One person can have several numbers, and multiple people can share the same number.
  11. Because we can have one phone number shared by many people, and a person can have many phone numbers, we are going to create a joining table between them. Our email addresses are considered unique, and because each address has one user, we place the primary key of the user in the email table as a foreign key.
  12. So, we need to remove the vertical redundancy of the company name, and the type column in the joining table violates 2NF, the type has more to do with the phone line than with the user and phone together.
  13. We now have a user/company table, with the department included since the department relates to the combination of user and company.
  14. There are a few places we can see potential 3NF violations: The phone extension is going to be different for each person in an office, and it not a property of the phone itself, so lets move it to the user_phone table. The email format, while often considered specific to a user, is probably more a property of the email address. Some may like text at work and tolerate HTML at home.