11stst
, 2, 2ndnd
, and 3, and 3rdrd
Normal FormsNormal Forms
ByBy
Carlos AlvaradoCarlos Alvarado
San Jose State UniversitySan Jose State University
OverviewOverview
 Today we’ll talk about:Today we’ll talk about:
 Database NormalizationDatabase Normalization
 Data Anomalies Caused by:Data Anomalies Caused by:
 Update, Insertion, DeletionUpdate, Insertion, Deletion
 Brief History/OverviewBrief History/Overview
 11stst
Normal FormNormal Form
 22ndnd
Normal FormNormal Form
 33rdrd
Normal FormNormal Form
 ConclusionConclusion
Database NormalizationDatabase Normalization
 The main goal of Database NormalizationThe main goal of Database Normalization
is to restructure the logical data model of ais to restructure the logical data model of a
database to:database to:
 Eliminate redundancyEliminate redundancy
 Organize data efficientlyOrganize data efficiently
 Reduce the potential for data anomalies.Reduce the potential for data anomalies.
Data AnomaliesData Anomalies
 Data anomalies are inconsistencies in the dataData anomalies are inconsistencies in the data
stored in a database as a result of an operationstored in a database as a result of an operation
such as update, insertion, and/or deletion.such as update, insertion, and/or deletion.
 Such inconsistencies may arise when have aSuch inconsistencies may arise when have a
particular record stored in multiple locations andparticular record stored in multiple locations and
not all of the copies are updated.not all of the copies are updated.
 We can prevent such anomalies byWe can prevent such anomalies by
implementing 7 different level of normalizationimplementing 7 different level of normalization
called Normal Forms (NF)called Normal Forms (NF)
 We’ll only look at the first three.We’ll only look at the first three. 
Brief History/OverviewBrief History/Overview
 Database Normalization was first proposed by Edgar F.Database Normalization was first proposed by Edgar F.
Codd.Codd.
 Codd defined the first three Normal Forms, which we’llCodd defined the first three Normal Forms, which we’ll
look into, of the 7 known Normal Forms.look into, of the 7 known Normal Forms.
 In order to do normalization we must know what theIn order to do normalization we must know what the
requirements are for each of the three Normal Formsrequirements are for each of the three Normal Forms
that we’ll go over.that we’ll go over.
 One of the key requirements to remember is that NormalOne of the key requirements to remember is that Normal
Forms are progressive. That is, in order to have 3Forms are progressive. That is, in order to have 3rdrd
NFNF
we must have 2we must have 2ndnd
NF and in order to have 2NF and in order to have 2ndnd
NF we mustNF we must
have 1have 1stst
NF.NF.
11stst
Normal FormNormal Form
The RequirementsThe Requirements
 The requirements to satisfy the 1The requirements to satisfy the 1stst
NF:NF:
 Each table has a primary key: minimal set ofEach table has a primary key: minimal set of
attributes which can uniquely identify a recordattributes which can uniquely identify a record
 The values in each column of a table areThe values in each column of a table are
atomic (No multi-value attributes allowed).atomic (No multi-value attributes allowed).
 There are no repeating groups: two columnsThere are no repeating groups: two columns
do not store similar information in the samedo not store similar information in the same
table.table.
11stst
Normal FormNormal Form
ExampleExample
Un-normalized Students table:Un-normalized Students table:
Normalized Students table:Normalized Students table:
Student#Student# AdvIDAdvID AdvNameAdvName AdvRoomAdvRoom ClassClass
11
Class2Class2
123123 123A123A JamesJames 555555 102-8102-8 104-9104-9
124124 123B123B SmithSmith 467467 209-0209-0 102-8102-8
Student#Student# AdvIDAdvID AdvNameAdvName AdvRoomAdvRoom Class#Class#
123123 123A123A JamesJames 555555 102-8102-8
123123 123A123A JamesJames 555555 104-9104-9
124124 123B123B SmithSmith 467467 209-0209-0
124124 123B123B SmithSmith 467467 102-8102-8
22ndnd
Normal FormNormal Form
The RequirementsThe Requirements
 The requirements to satisfy the 2The requirements to satisfy the 2ndnd
NF:NF:
 All requirements for 1All requirements for 1stst
NF must be met.NF must be met.
 Redundant data across multiple rows of aRedundant data across multiple rows of a
table must be moved to a separate table.table must be moved to a separate table.
 The resulting tables must be related to each otherThe resulting tables must be related to each other
by use of foreign key.by use of foreign key.
22ndnd
Normal FormNormal Form
ExampleExampleStudents tableStudents table
Registration tableRegistration table
Student#Student# AdvIDAdvID AdvNameAdvName AdvRoomAdvRoom
123123 123A123A JamesJames 555555
124124 123B123B SmithSmith 467467
Student#Student# Class#Class#
123123 102-8102-8
123123 104-9104-9
124124 209-0209-0
124124 102-8102-8
33rdrd
Normal FormNormal Form
The RequirementsThe Requirements
 The requirements to satisfy the 3The requirements to satisfy the 3rdrd
NF:NF:
 All requirements for 2All requirements for 2ndnd
NF must be met.NF must be met.
 Eliminate fields that do not depend on theEliminate fields that do not depend on the
primary key;primary key;
 That is, any field that is dependent not only on theThat is, any field that is dependent not only on the
primary key but also on another field must beprimary key but also on another field must be
moved to another table.moved to another table.
33rdrd
Normal FormNormal Form
ExampleExample
Students table:Students table:
Student table:Student table: Advisor table:Advisor table:
Student#Student# AdvIDAdvID AdvNameAdvName AdvRoomAdvRoom
123123 123A123A JamesJames 555555
124124 123B123B SmithSmith 467467
Student#Student# AdvIDAdvID
123123 123A123A
124124 123B123B
AdvIDAdvID AdvNameAdvName AdvRoomAdvRoom
123A123A JamesJames 555555
123B123B SmithSmith 467467
33rdrd
Normal FormNormal Form
Example Cont.Example Cont.Students table:Students table:
Registration table:Registration table: Advisor table:Advisor table:
Student#Student# Class#Class#
123123 102-8102-8
123123 104-9104-9
124124 209-0209-0
124124 102-8102-8
AdvIDAdvID AdvNameAdvName AdvRoomAdvRoom
123A123A JamesJames 555555
123B123B SmithSmith 467467
Student#Student# AdvIDAdvID
123123 123A123A
124124 123B123B
ConclusionConclusion
 We have seen how DatabaseWe have seen how Database
Normalization can decrease redundancy,Normalization can decrease redundancy,
increase efficiency and reduce anomaliesincrease efficiency and reduce anomalies
by implementing three of seven differentby implementing three of seven different
levels of normalization called Normallevels of normalization called Normal
Forms. The first three NF’s are usuallyForms. The first three NF’s are usually
sufficient for most small to medium sizesufficient for most small to medium size
applications.applications.
ReferencesReferences
 Hillyer Mike, MySQL AB.Hillyer Mike, MySQL AB. An Introduction to Database NormalizationAn Introduction to Database Normalization,,
http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html,http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html,
accessed October 17, 2006.accessed October 17, 2006.
 Microsoft.Microsoft. Description of the database normalization basicsDescription of the database normalization basics,,
http://support.microsoft.com/kb/283878 , accessed October 17, 2006.http://support.microsoft.com/kb/283878 , accessed October 17, 2006.
 Wikipedia.Wikipedia. Database Normalization.Database Normalization.
http://en.wikipedia.org/wiki/Database_normalization.html , accessed Octoberhttp://en.wikipedia.org/wiki/Database_normalization.html , accessed October
17, 2006.17, 2006.

More Related Content

PPTX
Normalization in DBMS
PDF
Database Normalization
PPT
functional dependencies with example
PDF
Solid schemas & advanced sql
PDF
Advanced Normalization
PPTX
Database Normalization slides
PPT
Databases: Normalisation
PPTX
Databases
Normalization in DBMS
Database Normalization
functional dependencies with example
Solid schemas & advanced sql
Advanced Normalization
Database Normalization slides
Databases: Normalisation
Databases

Viewers also liked (20)

TXT
20150325194517 63011-data
PPTX
Dev bhatt
PDF
SMART daylight for SMART savings!
PDF
Hazelton brochurespreads
PPTX
Evidence-based Diagnosis in Medicine
PDF
What has social media ever done for me?
PPTX
Rohit shetty
PDF
The Heart Under Stress
PPSX
La lettre du contrôle de gestion et financier - le temps partagé externalisé
PPTX
The Challenge and Value of Research in Emergency Medicine
PPS
Vier kaarsen
PPTX
Presentacion astrid orellana
PPTX
Toad Business Intelligence Suite
PPTX
Distal DVT: Should we treat?
DOCX
Chapitre 3 monnaie et credit
PPTX
Formulating a research question: #SWEETS16
PPTX
Evidence-based Medicine: Evaluating treatments
PDF
Essentiel gestion - formation sur Excel 2007
PDF
Exemple de reporting commercial
PPTX
Making the most of journal clubs
20150325194517 63011-data
Dev bhatt
SMART daylight for SMART savings!
Hazelton brochurespreads
Evidence-based Diagnosis in Medicine
What has social media ever done for me?
Rohit shetty
The Heart Under Stress
La lettre du contrôle de gestion et financier - le temps partagé externalisé
The Challenge and Value of Research in Emergency Medicine
Vier kaarsen
Presentacion astrid orellana
Toad Business Intelligence Suite
Distal DVT: Should we treat?
Chapitre 3 monnaie et credit
Formulating a research question: #SWEETS16
Evidence-based Medicine: Evaluating treatments
Essentiel gestion - formation sur Excel 2007
Exemple de reporting commercial
Making the most of journal clubs
Ad

Similar to Roja128 (20)

PPTX
Database Normalization - First, second and Third Normal Forms with an example
PPT
normalization-1nf-to-3nf-with-same-example.ppt
PPTX
Normal forms in DBMS1st Normal Form 2nd Normal Form 3rd Normal Form
DOCX
Normalization
PPT
Normalization
PDF
Assignment#11
PPTX
normaliztion
PPT
Normalization
DOCX
Research gadot
PDF
What is Database NormalizationExplain the guidelines for ensuring t.pdf
PPT
Normalization PRESENTATION
PPTX
database Normalization
PPTX
Normalization presentation in Database Management System
PPTX
Normalization
PDF
Dependencies in various topics like normalisation and its types
PPT
Normalization
PDF
1683368767418684.pdf
PPTX
1-161103092724.pzxsdfdsdrgdrgdfgdfgdfgdfgptx
PPT
Normalization Accepted
PDF
Normalization in Database
Database Normalization - First, second and Third Normal Forms with an example
normalization-1nf-to-3nf-with-same-example.ppt
Normal forms in DBMS1st Normal Form 2nd Normal Form 3rd Normal Form
Normalization
Normalization
Assignment#11
normaliztion
Normalization
Research gadot
What is Database NormalizationExplain the guidelines for ensuring t.pdf
Normalization PRESENTATION
database Normalization
Normalization presentation in Database Management System
Normalization
Dependencies in various topics like normalisation and its types
Normalization
1683368767418684.pdf
1-161103092724.pzxsdfdsdrgdrgdfgdfgdfgdfgptx
Normalization Accepted
Normalization in Database
Ad

Roja128

  • 1. 11stst , 2, 2ndnd , and 3, and 3rdrd Normal FormsNormal Forms ByBy Carlos AlvaradoCarlos Alvarado San Jose State UniversitySan Jose State University
  • 2. OverviewOverview  Today we’ll talk about:Today we’ll talk about:  Database NormalizationDatabase Normalization  Data Anomalies Caused by:Data Anomalies Caused by:  Update, Insertion, DeletionUpdate, Insertion, Deletion  Brief History/OverviewBrief History/Overview  11stst Normal FormNormal Form  22ndnd Normal FormNormal Form  33rdrd Normal FormNormal Form  ConclusionConclusion
  • 3. Database NormalizationDatabase Normalization  The main goal of Database NormalizationThe main goal of Database Normalization is to restructure the logical data model of ais to restructure the logical data model of a database to:database to:  Eliminate redundancyEliminate redundancy  Organize data efficientlyOrganize data efficiently  Reduce the potential for data anomalies.Reduce the potential for data anomalies.
  • 4. Data AnomaliesData Anomalies  Data anomalies are inconsistencies in the dataData anomalies are inconsistencies in the data stored in a database as a result of an operationstored in a database as a result of an operation such as update, insertion, and/or deletion.such as update, insertion, and/or deletion.  Such inconsistencies may arise when have aSuch inconsistencies may arise when have a particular record stored in multiple locations andparticular record stored in multiple locations and not all of the copies are updated.not all of the copies are updated.  We can prevent such anomalies byWe can prevent such anomalies by implementing 7 different level of normalizationimplementing 7 different level of normalization called Normal Forms (NF)called Normal Forms (NF)  We’ll only look at the first three.We’ll only look at the first three. 
  • 5. Brief History/OverviewBrief History/Overview  Database Normalization was first proposed by Edgar F.Database Normalization was first proposed by Edgar F. Codd.Codd.  Codd defined the first three Normal Forms, which we’llCodd defined the first three Normal Forms, which we’ll look into, of the 7 known Normal Forms.look into, of the 7 known Normal Forms.  In order to do normalization we must know what theIn order to do normalization we must know what the requirements are for each of the three Normal Formsrequirements are for each of the three Normal Forms that we’ll go over.that we’ll go over.  One of the key requirements to remember is that NormalOne of the key requirements to remember is that Normal Forms are progressive. That is, in order to have 3Forms are progressive. That is, in order to have 3rdrd NFNF we must have 2we must have 2ndnd NF and in order to have 2NF and in order to have 2ndnd NF we mustNF we must have 1have 1stst NF.NF.
  • 6. 11stst Normal FormNormal Form The RequirementsThe Requirements  The requirements to satisfy the 1The requirements to satisfy the 1stst NF:NF:  Each table has a primary key: minimal set ofEach table has a primary key: minimal set of attributes which can uniquely identify a recordattributes which can uniquely identify a record  The values in each column of a table areThe values in each column of a table are atomic (No multi-value attributes allowed).atomic (No multi-value attributes allowed).  There are no repeating groups: two columnsThere are no repeating groups: two columns do not store similar information in the samedo not store similar information in the same table.table.
  • 7. 11stst Normal FormNormal Form ExampleExample Un-normalized Students table:Un-normalized Students table: Normalized Students table:Normalized Students table: Student#Student# AdvIDAdvID AdvNameAdvName AdvRoomAdvRoom ClassClass 11 Class2Class2 123123 123A123A JamesJames 555555 102-8102-8 104-9104-9 124124 123B123B SmithSmith 467467 209-0209-0 102-8102-8 Student#Student# AdvIDAdvID AdvNameAdvName AdvRoomAdvRoom Class#Class# 123123 123A123A JamesJames 555555 102-8102-8 123123 123A123A JamesJames 555555 104-9104-9 124124 123B123B SmithSmith 467467 209-0209-0 124124 123B123B SmithSmith 467467 102-8102-8
  • 8. 22ndnd Normal FormNormal Form The RequirementsThe Requirements  The requirements to satisfy the 2The requirements to satisfy the 2ndnd NF:NF:  All requirements for 1All requirements for 1stst NF must be met.NF must be met.  Redundant data across multiple rows of aRedundant data across multiple rows of a table must be moved to a separate table.table must be moved to a separate table.  The resulting tables must be related to each otherThe resulting tables must be related to each other by use of foreign key.by use of foreign key.
  • 9. 22ndnd Normal FormNormal Form ExampleExampleStudents tableStudents table Registration tableRegistration table Student#Student# AdvIDAdvID AdvNameAdvName AdvRoomAdvRoom 123123 123A123A JamesJames 555555 124124 123B123B SmithSmith 467467 Student#Student# Class#Class# 123123 102-8102-8 123123 104-9104-9 124124 209-0209-0 124124 102-8102-8
  • 10. 33rdrd Normal FormNormal Form The RequirementsThe Requirements  The requirements to satisfy the 3The requirements to satisfy the 3rdrd NF:NF:  All requirements for 2All requirements for 2ndnd NF must be met.NF must be met.  Eliminate fields that do not depend on theEliminate fields that do not depend on the primary key;primary key;  That is, any field that is dependent not only on theThat is, any field that is dependent not only on the primary key but also on another field must beprimary key but also on another field must be moved to another table.moved to another table.
  • 11. 33rdrd Normal FormNormal Form ExampleExample Students table:Students table: Student table:Student table: Advisor table:Advisor table: Student#Student# AdvIDAdvID AdvNameAdvName AdvRoomAdvRoom 123123 123A123A JamesJames 555555 124124 123B123B SmithSmith 467467 Student#Student# AdvIDAdvID 123123 123A123A 124124 123B123B AdvIDAdvID AdvNameAdvName AdvRoomAdvRoom 123A123A JamesJames 555555 123B123B SmithSmith 467467
  • 12. 33rdrd Normal FormNormal Form Example Cont.Example Cont.Students table:Students table: Registration table:Registration table: Advisor table:Advisor table: Student#Student# Class#Class# 123123 102-8102-8 123123 104-9104-9 124124 209-0209-0 124124 102-8102-8 AdvIDAdvID AdvNameAdvName AdvRoomAdvRoom 123A123A JamesJames 555555 123B123B SmithSmith 467467 Student#Student# AdvIDAdvID 123123 123A123A 124124 123B123B
  • 13. ConclusionConclusion  We have seen how DatabaseWe have seen how Database Normalization can decrease redundancy,Normalization can decrease redundancy, increase efficiency and reduce anomaliesincrease efficiency and reduce anomalies by implementing three of seven differentby implementing three of seven different levels of normalization called Normallevels of normalization called Normal Forms. The first three NF’s are usuallyForms. The first three NF’s are usually sufficient for most small to medium sizesufficient for most small to medium size applications.applications.
  • 14. ReferencesReferences  Hillyer Mike, MySQL AB.Hillyer Mike, MySQL AB. An Introduction to Database NormalizationAn Introduction to Database Normalization,, http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html,http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html, accessed October 17, 2006.accessed October 17, 2006.  Microsoft.Microsoft. Description of the database normalization basicsDescription of the database normalization basics,, http://support.microsoft.com/kb/283878 , accessed October 17, 2006.http://support.microsoft.com/kb/283878 , accessed October 17, 2006.  Wikipedia.Wikipedia. Database Normalization.Database Normalization. http://en.wikipedia.org/wiki/Database_normalization.html , accessed Octoberhttp://en.wikipedia.org/wiki/Database_normalization.html , accessed October 17, 2006.17, 2006.