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

Mais procurados (20)

Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)
 
Dynamic Itemset Counting
Dynamic Itemset CountingDynamic Itemset Counting
Dynamic Itemset Counting
 
Dw & etl concepts
Dw & etl conceptsDw & etl concepts
Dw & etl concepts
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
Rdbms
RdbmsRdbms
Rdbms
 
Open Source Reporting Tool Comparison
Open Source Reporting Tool ComparisonOpen Source Reporting Tool Comparison
Open Source Reporting Tool Comparison
 
Mobile dbms
Mobile dbmsMobile dbms
Mobile dbms
 
Normalization
NormalizationNormalization
Normalization
 
Data Warehouse
Data WarehouseData Warehouse
Data Warehouse
 
Binary tree
Binary treeBinary tree
Binary tree
 
DATA WAREHOUSING
DATA WAREHOUSINGDATA WAREHOUSING
DATA WAREHOUSING
 
Joins in SQL
Joins in SQLJoins in SQL
Joins in SQL
 
Data Flow Diagrams
Data Flow DiagramsData Flow Diagrams
Data Flow Diagrams
 
Database architecture
Database architectureDatabase architecture
Database architecture
 
Online analytical processing
Online analytical processingOnline analytical processing
Online analytical processing
 
Parallel Database
Parallel DatabaseParallel Database
Parallel Database
 
Distributed dbms architectures
Distributed dbms architecturesDistributed dbms architectures
Distributed dbms architectures
 
Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPT
 
Lecture 11 - distributed database
Lecture 11 - distributed databaseLecture 11 - distributed database
Lecture 11 - distributed database
 
Database design
Database designDatabase design
Database design
 

Destaque (13)

Database normalization
Database normalizationDatabase normalization
Database normalization
 
Normalization in a Database
Normalization in a DatabaseNormalization in a Database
Normalization in a Database
 
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
 
Anomalies in database
Anomalies in databaseAnomalies in database
Anomalies 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 방법
 
Normalization
NormalizationNormalization
Normalization
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
DBMS - Normalization
DBMS - NormalizationDBMS - Normalization
DBMS - Normalization
 

Último

SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 

Último (20)

SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 

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