SlideShare uma empresa Scribd logo
1 de 10
Baixar para ler offline
Database Normalization
●   Overview
    –   Definition of database normalization

    –   Why normalize?

    –   First normal form

    –   Second normal form

    –   Third normal form
        Information for this presentation borrowed from
         http://www.devshed.com/c/a/MySQL/An-Introduction-to-Database-Normalization/
Database Normalization
●   Definition
    –   Optimizing table structures

    –   Removing duplicate data entries

    –   Accomplished by thouroughly investigating the
        various data types and their relationships with
        one another

    –   Follows a series of normalization “forms” or
        states
Database Normalization
●   Why Normalize?
    –   Improved speed

    –   More efficient use of space

    –   Increased data integrity
         ●   (decreased chance that data can get messed up due
             to maintenance)
Database Normalization
●   A sad, sad database:
    –   Refer to the following poor database design:
         student_id   class_name      time      location   professor_id
        999-40-9876    Math 148     MWF 11:30   Rm. 432      prof145
        999-43-0987   Physics 113    TR 1:30    Rm. 12       prof143
        999-42-9842    Botany 42     F 12:45     Rm. 9       prof167
        999-41-9832    Matj 148     MWF 11:30   Rm. 432      prof145


    –   Problems
         ●   no need to repeatedly store the class time and
             professor ID
         ●   redundancy introduces the possibility for error (Matj
             148)
Database Normalization
●   First Normal Form
    –   calls for the elimination of repeated groups of
        data by creating separate tables of related data
    –   Student information:
           StudentID   StudentName   Major   college   collegeLocation


    –   Class information:
           StudentID   ClassID       ClassName


    –   Professor Information:
           ProfessorID ProfessorName
Database Normalization
●   Second Normal Form
    –   Elimination of redundant data
         ●   Example data in Class Information:
              studentID           classID   className
              134-56-7890         M148      Math 148
              123-45-7894         P113      Physics 113
              534-98-9009         H151      History 151
              134-56-7890         H151      History 151


             Use:                                      To get Class Information:
               ClassID      ClassName                        studentID     classID
               M148         Math 148                         134-56-7890   M148
               P113         Physics 113                      123-45-7894   P113
               H151         History 151                      534-98-9009   H151
                                                             134-56-7890   H151
Database Normalization
●   Third Normal Form
    –   eliminate all attributes(column headers) from a
        table that are not directly dependent upon the
        primary key
         ●   college and collegeLocation attributes are less
             dependent upon the studentID than they are on
             the major attribute
         ●   New college table:
                major   college   collegeLocation

         ●   Revised student table:
                studentID   studentName   Major
Database Normalization
●   Old Design:
            student_id     class_name         time             location      professor_id
          999-40-9876        Math 148       MWF 11:30          Rm. 432            prof145
          999-43-0987       Physics 113      TR 1:30           Rm. 12             prof143
          999-42-9842        Botany 42       F 12:45            Rm. 9             prof167
          999-41-9832        Matj 148       MWF 11:30          Rm. 432            prof145




    New Design:
    Student                                   Enrollment                  Class
    studentID      studentName      Major     studentID     classID       ClassID       ClassName   ProfessorID




    College                                   Professor
    major       college   collegeLocation     ProfessorID      ProfessorName
Database Normalization
●   Questions?
Normalization Assignment
●   For your tool:
    –   Compile list of all data items used

    –   Place all data into one table

    –   Complete 1NF and describe reasons why this is
        better (or if data is already in 1NF continue)

    –   Complete 2NF in the same manner

    –   Complete 3NF in the same manner

Mais conteúdo relacionado

Mais procurados

Introduction & history of dbms
Introduction & history of dbmsIntroduction & history of dbms
Introduction & history of dbmssethu pm
 
Database System Concepts and Architecture
Database System Concepts and ArchitectureDatabase System Concepts and Architecture
Database System Concepts and Architecturesontumax
 
Difference between Homogeneous and Heterogeneous
Difference between Homogeneous  and    HeterogeneousDifference between Homogeneous  and    Heterogeneous
Difference between Homogeneous and HeterogeneousFaraz Qaisrani
 
Query optimization
Query optimizationQuery optimization
Query optimizationPooja Dixit
 
Database backup and recovery
Database backup and recoveryDatabase backup and recovery
Database backup and recoveryAnne Lee
 
Normalization in a Database
Normalization in a DatabaseNormalization in a Database
Normalization in a DatabaseBishrul Haq
 
Database systems - Chapter 1
Database systems - Chapter 1Database systems - Chapter 1
Database systems - Chapter 1shahab3
 
Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to DatabaseSiti Ismail
 
Data modeling using the entity relationship model
Data modeling using the entity relationship modelData modeling using the entity relationship model
Data modeling using the entity relationship modelJafar Nesargi
 
Learn Normalization in simple language
Learn Normalization in simple languageLearn Normalization in simple language
Learn Normalization in simple languageFirstWire Apps
 
Software Configuration Management (SCM)
Software Configuration Management (SCM)Software Configuration Management (SCM)
Software Configuration Management (SCM)Er. Shiva K. Shrestha
 

Mais procurados (20)

Dbms presentaion
Dbms presentaionDbms presentaion
Dbms presentaion
 
Files Vs DataBase
Files Vs DataBaseFiles Vs DataBase
Files Vs DataBase
 
Introduction & history of dbms
Introduction & history of dbmsIntroduction & history of dbms
Introduction & history of dbms
 
Database System Concepts and Architecture
Database System Concepts and ArchitectureDatabase System Concepts and Architecture
Database System Concepts and Architecture
 
Difference between Homogeneous and Heterogeneous
Difference between Homogeneous  and    HeterogeneousDifference between Homogeneous  and    Heterogeneous
Difference between Homogeneous and Heterogeneous
 
File organisation
File organisationFile organisation
File organisation
 
Query optimization
Query optimizationQuery optimization
Query optimization
 
Database Intergrity
Database IntergrityDatabase Intergrity
Database Intergrity
 
Database backup and recovery
Database backup and recoveryDatabase backup and recovery
Database backup and recovery
 
Normalization in a Database
Normalization in a DatabaseNormalization in a Database
Normalization in a Database
 
Database systems - Chapter 1
Database systems - Chapter 1Database systems - Chapter 1
Database systems - Chapter 1
 
Anomalies in database
Anomalies in databaseAnomalies in database
Anomalies in database
 
Distributed DBMS - Unit 1 - Introduction
Distributed DBMS - Unit 1 - IntroductionDistributed DBMS - Unit 1 - Introduction
Distributed DBMS - Unit 1 - Introduction
 
Ch1- Introduction to dbms
Ch1- Introduction to dbmsCh1- Introduction to dbms
Ch1- Introduction to dbms
 
Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to Database
 
Data modeling using the entity relationship model
Data modeling using the entity relationship modelData modeling using the entity relationship model
Data modeling using the entity relationship model
 
Normalization in databases
Normalization in databasesNormalization in databases
Normalization in databases
 
Learn Normalization in simple language
Learn Normalization in simple languageLearn Normalization in simple language
Learn Normalization in simple language
 
Software Configuration Management (SCM)
Software Configuration Management (SCM)Software Configuration Management (SCM)
Software Configuration Management (SCM)
 
Normalization
NormalizationNormalization
Normalization
 

Destaque

Database normalization
Database normalizationDatabase normalization
Database normalizationEdward Blurock
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Jargalsaikhan Alyeksandr
 
Database - Normalization
Database - NormalizationDatabase - Normalization
Database - NormalizationMudasir Qazi
 
Database Normalization
Database NormalizationDatabase Normalization
Database NormalizationEhsan Hamzei
 
Normalization in Database
Normalization in DatabaseNormalization in Database
Normalization in DatabaseRoshni Singh
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database DesignArchit Saxena
 
Normalization 방법
Normalization 방법 Normalization 방법
Normalization 방법 홍배 김
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship DiagramShakila Mahjabin
 

Destaque (11)

Database normalization
Database normalizationDatabase normalization
Database normalization
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)
 
Dbms normalization
Dbms normalizationDbms normalization
Dbms normalization
 
Database - Normalization
Database - NormalizationDatabase - Normalization
Database - Normalization
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
Normalization in Database
Normalization in DatabaseNormalization in Database
Normalization in Database
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Normalization 방법
Normalization 방법 Normalization 방법
Normalization 방법
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
DBMS - Normalization
DBMS - NormalizationDBMS - Normalization
DBMS - Normalization
 

Último

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 

Último (20)

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

Db normalization

  • 1. Database Normalization ● Overview – Definition of database normalization – Why normalize? – First normal form – Second normal form – Third normal form Information for this presentation borrowed from http://www.devshed.com/c/a/MySQL/An-Introduction-to-Database-Normalization/
  • 2. Database Normalization ● Definition – Optimizing table structures – Removing duplicate data entries – Accomplished by thouroughly investigating the various data types and their relationships with one another – Follows a series of normalization “forms” or states
  • 3. Database Normalization ● Why Normalize? – Improved speed – More efficient use of space – Increased data integrity ● (decreased chance that data can get messed up due to maintenance)
  • 4. Database Normalization ● A sad, sad database: – Refer to the following poor database design: student_id class_name time location professor_id 999-40-9876 Math 148 MWF 11:30 Rm. 432 prof145 999-43-0987 Physics 113 TR 1:30 Rm. 12 prof143 999-42-9842 Botany 42 F 12:45 Rm. 9 prof167 999-41-9832 Matj 148 MWF 11:30 Rm. 432 prof145 – Problems ● no need to repeatedly store the class time and professor ID ● redundancy introduces the possibility for error (Matj 148)
  • 5. Database Normalization ● First Normal Form – calls for the elimination of repeated groups of data by creating separate tables of related data – Student information: StudentID StudentName Major college collegeLocation – Class information: StudentID ClassID ClassName – Professor Information: ProfessorID ProfessorName
  • 6. Database Normalization ● Second Normal Form – Elimination of redundant data ● Example data in Class Information: studentID classID className 134-56-7890 M148 Math 148 123-45-7894 P113 Physics 113 534-98-9009 H151 History 151 134-56-7890 H151 History 151 Use: To get Class Information: ClassID ClassName studentID classID M148 Math 148 134-56-7890 M148 P113 Physics 113 123-45-7894 P113 H151 History 151 534-98-9009 H151 134-56-7890 H151
  • 7. Database Normalization ● Third Normal Form – eliminate all attributes(column headers) from a table that are not directly dependent upon the primary key ● college and collegeLocation attributes are less dependent upon the studentID than they are on the major attribute ● New college table: major college collegeLocation ● Revised student table: studentID studentName Major
  • 8. Database Normalization ● Old Design: student_id class_name time location professor_id 999-40-9876 Math 148 MWF 11:30 Rm. 432 prof145 999-43-0987 Physics 113 TR 1:30 Rm. 12 prof143 999-42-9842 Botany 42 F 12:45 Rm. 9 prof167 999-41-9832 Matj 148 MWF 11:30 Rm. 432 prof145 New Design: Student Enrollment Class studentID studentName Major studentID classID ClassID ClassName ProfessorID College Professor major college collegeLocation ProfessorID ProfessorName
  • 10. Normalization Assignment ● For your tool: – Compile list of all data items used – Place all data into one table – Complete 1NF and describe reasons why this is better (or if data is already in 1NF continue) – Complete 2NF in the same manner – Complete 3NF in the same manner