SlideShare ist ein Scribd-Unternehmen logo
1 von 10
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

Relational Database Examples
Relational Database ExamplesRelational Database Examples
Relational Database ExamplesJohn Cutajar
 
Bsc cs ii-dbms-u-iv-normalization
Bsc cs ii-dbms-u-iv-normalizationBsc cs ii-dbms-u-iv-normalization
Bsc cs ii-dbms-u-iv-normalizationRai University
 
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFOum Saokosal
 
Hub 102 - Lesson 5 - Algorithm: Sorting & Searching
Hub 102 - Lesson 5 - Algorithm: Sorting & SearchingHub 102 - Lesson 5 - Algorithm: Sorting & Searching
Hub 102 - Lesson 5 - Algorithm: Sorting & SearchingTiểu Hổ
 
08. Object Oriented Database in DBMS
08. Object Oriented Database in DBMS08. Object Oriented Database in DBMS
08. Object Oriented Database in DBMSkoolkampus
 
Encapsulation of operations, methods & persistence
Encapsulation of operations, methods & persistenceEncapsulation of operations, methods & persistence
Encapsulation of operations, methods & persistencePrem Lamsal
 
Database systems - Chapter 2
Database systems - Chapter 2Database systems - Chapter 2
Database systems - Chapter 2shahab3
 
Database System Architecture
Database System ArchitectureDatabase System Architecture
Database System ArchitectureVignesh Saravanan
 
Normalization PRESENTATION
Normalization PRESENTATIONNormalization PRESENTATION
Normalization PRESENTATIONbit allahabad
 
Learn Normalization in simple language
Learn Normalization in simple languageLearn Normalization in simple language
Learn Normalization in simple languageFirstWire Apps
 
DBMS Architectures and Features - Lecture 7 - Introduction to Databases (1007...
DBMS Architectures and Features - Lecture 7 - Introduction to Databases (1007...DBMS Architectures and Features - Lecture 7 - Introduction to Databases (1007...
DBMS Architectures and Features - Lecture 7 - Introduction to Databases (1007...Beat Signer
 

Was ist angesagt? (20)

Relational Database Examples
Relational Database ExamplesRelational Database Examples
Relational Database Examples
 
Bsc cs ii-dbms-u-iv-normalization
Bsc cs ii-dbms-u-iv-normalizationBsc cs ii-dbms-u-iv-normalization
Bsc cs ii-dbms-u-iv-normalization
 
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
 
Hub 102 - Lesson 5 - Algorithm: Sorting & Searching
Hub 102 - Lesson 5 - Algorithm: Sorting & SearchingHub 102 - Lesson 5 - Algorithm: Sorting & Searching
Hub 102 - Lesson 5 - Algorithm: Sorting & Searching
 
Deductive databases
Deductive databasesDeductive databases
Deductive databases
 
normaliztion
normaliztionnormaliztion
normaliztion
 
08. Object Oriented Database in DBMS
08. Object Oriented Database in DBMS08. Object Oriented Database in DBMS
08. Object Oriented Database in DBMS
 
Query processing
Query processingQuery processing
Query processing
 
Bcnf
BcnfBcnf
Bcnf
 
Normalization
NormalizationNormalization
Normalization
 
Encapsulation of operations, methods & persistence
Encapsulation of operations, methods & persistenceEncapsulation of operations, methods & persistence
Encapsulation of operations, methods & persistence
 
Database systems - Chapter 2
Database systems - Chapter 2Database systems - Chapter 2
Database systems - Chapter 2
 
Database System Architecture
Database System ArchitectureDatabase System Architecture
Database System Architecture
 
Distributed DBMS - Unit 6 - Query Processing
Distributed DBMS - Unit 6 - Query ProcessingDistributed DBMS - Unit 6 - Query Processing
Distributed DBMS - Unit 6 - Query Processing
 
Ddbms1
Ddbms1Ddbms1
Ddbms1
 
Normalization PRESENTATION
Normalization PRESENTATIONNormalization PRESENTATION
Normalization PRESENTATION
 
Database Systems Concepts, 5th Ed
Database Systems Concepts, 5th EdDatabase Systems Concepts, 5th Ed
Database Systems Concepts, 5th Ed
 
Branch & bound
Branch & boundBranch & bound
Branch & bound
 
Learn Normalization in simple language
Learn Normalization in simple languageLearn Normalization in simple language
Learn Normalization in simple language
 
DBMS Architectures and Features - Lecture 7 - Introduction to Databases (1007...
DBMS Architectures and Features - Lecture 7 - Introduction to Databases (1007...DBMS Architectures and Features - Lecture 7 - Introduction to Databases (1007...
DBMS Architectures and Features - Lecture 7 - Introduction to Databases (1007...
 

Andere mochten auch

Andere mochten auch (12)

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
 
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 방법
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
DBMS - Normalization
DBMS - NormalizationDBMS - Normalization
DBMS - Normalization
 

Kürzlich hochgeladen

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
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
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
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
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
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
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
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
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 

Kürzlich hochgeladen (20)

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
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
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
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
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
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
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
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
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 

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