9
Most read
13
Most read
16
Most read
NormalizationNormalization
By Amit KumarBy Amit Kumar
Database NormalizationDatabase Normalization
 Database normalizationDatabase normalization is the process of removingis the process of removing
redundant data from your tables in to improve storageredundant data from your tables in to improve storage
efficiency, data integrity, and scalability.efficiency, data integrity, and scalability.
 In the relational model, methods exist for quantifying howIn the relational model, methods exist for quantifying how
efficient a database is. These classifications are calledefficient a database is. These classifications are called
normal formsnormal forms (or(or NFNF), and there are algorithms for), and there are algorithms for
converting a given database between them.converting a given database between them.
 Normalization generally involves splitting existing tablesNormalization generally involves splitting existing tables
into multiple ones, which must be re-joined or linkedinto multiple ones, which must be re-joined or linked
each time a query is issued.each time a query is issued.
HistoryHistory
 Edgar F. Codd first proposed the process ofEdgar F. Codd first proposed the process of
normalization and what came to be known asnormalization and what came to be known as
thethe 1st normal form1st normal form in his paperin his paper A RelationalA Relational
Model of Data for Large Shared Data BanksModel of Data for Large Shared Data Banks
Codd stated:Codd stated:
““There is, in fact, a very simple eliminationThere is, in fact, a very simple elimination
procedure which we shall call normalization.procedure which we shall call normalization.
Through decomposition nonsimple domains areThrough decomposition nonsimple domains are
replaced by ‘replaced by ‘domains whose elements aredomains whose elements are
atomic (nondecomposable) values.’”atomic (nondecomposable) values.’”
Normal FormNormal Form
 Edgar F. Codd originally established threeEdgar F. Codd originally established three
normal forms: 1NF, 2NF and 3NF. Therenormal forms: 1NF, 2NF and 3NF. There
are now others that are generallyare now others that are generally
accepted, but 3NF is widely considered toaccepted, but 3NF is widely considered to
be sufficient for most applications. Mostbe sufficient for most applications. Most
tables when reaching 3NF are also intables when reaching 3NF are also in
BCNF (Boyce-Codd Normal Form).BCNF (Boyce-Codd Normal Form).
Table 1Table 1
TitleTitle Author1Author1 AuthorAuthor
22
ISBNISBN SubjectSubject PagesPages PublisherPublisher
DatabaseDatabase
SystemSystem
ConceptsConcepts
AbrahamAbraham
SilberschatzSilberschatz
HenryHenry
F. KorthF. Korth
00729588630072958863 MySQL,MySQL,
ComputersComputers
11681168 McGraw-HillMcGraw-Hill
OperatingOperating
SystemSystem
ConceptsConcepts
AbrahamAbraham
SilberschatzSilberschatz
HenryHenry
F. KorthF. Korth
04716946650471694665 ComputersComputers 944944 McGraw-HillMcGraw-Hill
Table 1 problemsTable 1 problems
 This table is not very efficient with storage.This table is not very efficient with storage.
 This design does not protect data integrity.This design does not protect data integrity.
 Third, this table does not scale well.Third, this table does not scale well.
First Normal FormFirst Normal Form
 In our Table 1, we have two violations ofIn our Table 1, we have two violations of
First Normal Form:First Normal Form:
 First, we have more than one author field,First, we have more than one author field,
 Second, our subject field contains moreSecond, our subject field contains more
than one piece of information. With morethan one piece of information. With more
than one value in a single field, it would bethan one value in a single field, it would be
very difficult to search for all books on avery difficult to search for all books on a
given subject.given subject.
First Normal TableFirst Normal Table
 Table 2Table 2
TitleTitle AuthorAuthor ISBNISBN SubjectSubject PagesPages PublisherPublisher
Database SystemDatabase System
ConceptsConcepts
AbrahamAbraham
SilberschatzSilberschatz
00729588630072958863 MySQLMySQL 11681168 McGraw-HillMcGraw-Hill
Database SystemDatabase System
ConceptsConcepts
Henry F. KorthHenry F. Korth 00729588630072958863 ComputersComputers 11681168 McGraw-HillMcGraw-Hill
Operating SystemOperating System
ConceptsConcepts
Henry F. KorthHenry F. Korth 04716946650471694665 ComputersComputers 944944 McGraw-HillMcGraw-Hill
Operating SystemOperating System
ConceptsConcepts
AbrahamAbraham
SilberschatzSilberschatz
04716946650471694665 ComputersComputers 944944 McGraw-HillMcGraw-Hill
 We now have two rows for a single book.We now have two rows for a single book.
Additionally, we would be violating theAdditionally, we would be violating the
Second Normal Form…Second Normal Form…
 A better solution to our problem would beA better solution to our problem would be
to separate the data into separate tables-to separate the data into separate tables-
an Author table and a Subject table toan Author table and a Subject table to
store our information, removing thatstore our information, removing that
information from the Book table:information from the Book table:
Subject_IDSubject_ID SubjectSubject
11 MySQLMySQL
22 ComputersComputers
Author_IDAuthor_ID Last NameLast Name First NameFirst Name
11 SilberschatzSilberschatz AbrahamAbraham
22 KorthKorth HenryHenry
ISBNISBN TitleTitle PagesPages PublisherPublisher
00729588630072958863 Database SystemDatabase System
ConceptsConcepts
11681168 McGraw-HillMcGraw-Hill
04716946650471694665 Operating SystemOperating System
ConceptsConcepts
944944 McGraw-HillMcGraw-Hill
Subject Table
Author Table
Book Table
 Each table has a primary key, used forEach table has a primary key, used for
joining tables together when querying thejoining tables together when querying the
data. A primary key value must be uniquedata. A primary key value must be unique
with in the table (no two books can havewith in the table (no two books can have
the same ISBN number), and a primarythe same ISBN number), and a primary
key is also an index, which speeds upkey is also an index, which speeds up
data retrieval based on the primary key.data retrieval based on the primary key.
 Now to define relationships between theNow to define relationships between the
tablestables
RelationshipsRelationships
ISBNISBN Author_IDAuthor_ID
00729588630072958863 11
00729588630072958863 22
04716946650471694665 11
04716946650471694665 22
ISBNISBN Subject_IDSubject_ID
00729588630072958863 11
00729588630072958863 22
04716946650471694665 22
Book_Author Table
Book_Subject Table
Second Normal FormSecond Normal Form
 As the First Normal Form deals with redundancyAs the First Normal Form deals with redundancy
of data across a horizontal row, Second Normalof data across a horizontal row, Second Normal
Form (or 2NF) deals with redundancy of data inForm (or 2NF) deals with redundancy of data in
vertical columns.vertical columns.
 As stated earlier, the normal forms areAs stated earlier, the normal forms are
progressive, so to achieve Second Normalprogressive, so to achieve Second Normal
Form, the tables must already be in First NormalForm, the tables must already be in First Normal
Form.Form.
 The Book Table will be used for the 2NFThe Book Table will be used for the 2NF
exampleexample
2NF Table2NF Table
Publisher_IDPublisher_ID Publisher NamePublisher Name
11 McGraw-HillMcGraw-Hill
ISBNISBN TitleTitle PagesPages Publisher_IDPublisher_ID
00729588630072958863 Database SystemDatabase System
ConceptsConcepts
11681168 11
04716946650471694665 Operating SystemOperating System
ConceptsConcepts
944944 11
Publisher Table
Book Table
2NF2NF
 Here we have a one-to-many relationshipHere we have a one-to-many relationship
between the book table and the publisher. Abetween the book table and the publisher. A
book has only one publisher, and a publisher willbook has only one publisher, and a publisher will
publish many books. When we have a one-to-publish many books. When we have a one-to-
many relationship, we place a foreign key in themany relationship, we place a foreign key in the
Book Table, pointing to the primary key of theBook Table, pointing to the primary key of the
Publisher Table.Publisher Table.
 The other requirement for Second Normal FormThe other requirement for Second Normal Form
is that you cannot have any data in a table with ais that you cannot have any data in a table with a
composite key that does not relate to all portionscomposite key that does not relate to all portions
of the composite key.of the composite key.
Third Normal FormThird Normal Form
 Third normal form (3NF) requires thatThird normal form (3NF) requires that
there are no functional dependencies ofthere are no functional dependencies of
non-key attributes on something othernon-key attributes on something other
than a candidate key.than a candidate key.
 A table is in 3NF if all of the non-primaryA table is in 3NF if all of the non-primary
key attributes are mutually independentkey attributes are mutually independent
 There should not be transitiveThere should not be transitive
dependenciesdependencies
Boyce-Codd Normal FormBoyce-Codd Normal Form
 BCNF requires that the table is 3NF andBCNF requires that the table is 3NF and
only determinants are the candidate keysonly determinants are the candidate keys
ENDEND

More Related Content

PPTX
Normalization in DBMS
PPTX
Procrastination
PPTX
Machine learning seminar ppt
PDF
Environmental pollution
PPT
Image enhancement
PDF
Normalization in DBMS
PPT
Joins in SQL
PPTX
How to Avoid Procrastination
Normalization in DBMS
Procrastination
Machine learning seminar ppt
Environmental pollution
Image enhancement
Normalization in DBMS
Joins in SQL
How to Avoid Procrastination

What's hot (20)

PPT
Databases: Normalisation
PPTX
Binary Tree Traversal
PPT
Types Of Join In Sql Server - Join With Example In Sql Server
PPTX
Normalization
PPTX
Transaction Properties in database | ACID Properties
PPTX
Sql joins inner join self join outer joins
PPT
Aggregate functions
PDF
Database Normalization
PPTX
Selection sorting
PPT
Abstract data types
PPTX
Deadlock dbms
PPTX
Types Of Keys in DBMS
PPT
Constraints In Sql
PPTX
DBMS Keys
PPTX
Queue ppt
PDF
Nested Queries Lecture
PPTX
Array in c++
Databases: Normalisation
Binary Tree Traversal
Types Of Join In Sql Server - Join With Example In Sql Server
Normalization
Transaction Properties in database | ACID Properties
Sql joins inner join self join outer joins
Aggregate functions
Database Normalization
Selection sorting
Abstract data types
Deadlock dbms
Types Of Keys in DBMS
Constraints In Sql
DBMS Keys
Queue ppt
Nested Queries Lecture
Array in c++
Ad

Similar to Normalization PRESENTATION (20)

PPT
Normalization
PPT
Normalization
PPT
Normalization Accepted
PPTX
Karan normalization in sql
PPTX
Normalization presentation in Database Management System
PPT
Jason Park Normalization
PPT
Normalization
PPTX
Database Normalization.pptx
PDF
Relational Theory for Budding Einsteins -- LonestarPHP 2016
PDF
Normalization form tutorial
PPT
Normalization
PDF
SQL For Programmers -- Boston Big Data Techcon April 27th
PPTX
Advance Sqlite3
PDF
Dbms fundamentals
PPTX
normaliztion
PPTX
T-SQL Overview
PDF
bigD3_mapReducebigD3_mapReducebigD3_mapReduce.pdf
PPTX
Advance sqlite3
PDF
Final exam in advance dbms
Normalization
Normalization
Normalization Accepted
Karan normalization in sql
Normalization presentation in Database Management System
Jason Park Normalization
Normalization
Database Normalization.pptx
Relational Theory for Budding Einsteins -- LonestarPHP 2016
Normalization form tutorial
Normalization
SQL For Programmers -- Boston Big Data Techcon April 27th
Advance Sqlite3
Dbms fundamentals
normaliztion
T-SQL Overview
bigD3_mapReducebigD3_mapReducebigD3_mapReduce.pdf
Advance sqlite3
Final exam in advance dbms
Ad

Recently uploaded (20)

PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
Computer Architecture Input Output Memory.pptx
PDF
Hazard Identification & Risk Assessment .pdf
PDF
What if we spent less time fighting change, and more time building what’s rig...
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PDF
HVAC Specification 2024 according to central public works department
PDF
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PDF
IGGE1 Understanding the Self1234567891011
PDF
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
PPTX
Share_Module_2_Power_conflict_and_negotiation.pptx
PPTX
20th Century Theater, Methods, History.pptx
PDF
advance database management system book.pdf
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
International_Financial_Reporting_Standa.pdf
FORM 1 BIOLOGY MIND MAPS and their schemes
Paper A Mock Exam 9_ Attempt review.pdf.
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
LDMMIA Reiki Yoga Finals Review Spring Summer
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Computer Architecture Input Output Memory.pptx
Hazard Identification & Risk Assessment .pdf
What if we spent less time fighting change, and more time building what’s rig...
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
HVAC Specification 2024 according to central public works department
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
A powerpoint presentation on the Revised K-10 Science Shaping Paper
IGGE1 Understanding the Self1234567891011
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
Share_Module_2_Power_conflict_and_negotiation.pptx
20th Century Theater, Methods, History.pptx
advance database management system book.pdf
Chinmaya Tiranga quiz Grand Finale.pdf
International_Financial_Reporting_Standa.pdf

Normalization PRESENTATION

  • 2. Database NormalizationDatabase Normalization  Database normalizationDatabase normalization is the process of removingis the process of removing redundant data from your tables in to improve storageredundant data from your tables in to improve storage efficiency, data integrity, and scalability.efficiency, data integrity, and scalability.  In the relational model, methods exist for quantifying howIn the relational model, methods exist for quantifying how efficient a database is. These classifications are calledefficient a database is. These classifications are called normal formsnormal forms (or(or NFNF), and there are algorithms for), and there are algorithms for converting a given database between them.converting a given database between them.  Normalization generally involves splitting existing tablesNormalization generally involves splitting existing tables into multiple ones, which must be re-joined or linkedinto multiple ones, which must be re-joined or linked each time a query is issued.each time a query is issued.
  • 3. HistoryHistory  Edgar F. Codd first proposed the process ofEdgar F. Codd first proposed the process of normalization and what came to be known asnormalization and what came to be known as thethe 1st normal form1st normal form in his paperin his paper A RelationalA Relational Model of Data for Large Shared Data BanksModel of Data for Large Shared Data Banks Codd stated:Codd stated: ““There is, in fact, a very simple eliminationThere is, in fact, a very simple elimination procedure which we shall call normalization.procedure which we shall call normalization. Through decomposition nonsimple domains areThrough decomposition nonsimple domains are replaced by ‘replaced by ‘domains whose elements aredomains whose elements are atomic (nondecomposable) values.’”atomic (nondecomposable) values.’”
  • 4. Normal FormNormal Form  Edgar F. Codd originally established threeEdgar F. Codd originally established three normal forms: 1NF, 2NF and 3NF. Therenormal forms: 1NF, 2NF and 3NF. There are now others that are generallyare now others that are generally accepted, but 3NF is widely considered toaccepted, but 3NF is widely considered to be sufficient for most applications. Mostbe sufficient for most applications. Most tables when reaching 3NF are also intables when reaching 3NF are also in BCNF (Boyce-Codd Normal Form).BCNF (Boyce-Codd Normal Form).
  • 5. Table 1Table 1 TitleTitle Author1Author1 AuthorAuthor 22 ISBNISBN SubjectSubject PagesPages PublisherPublisher DatabaseDatabase SystemSystem ConceptsConcepts AbrahamAbraham SilberschatzSilberschatz HenryHenry F. KorthF. Korth 00729588630072958863 MySQL,MySQL, ComputersComputers 11681168 McGraw-HillMcGraw-Hill OperatingOperating SystemSystem ConceptsConcepts AbrahamAbraham SilberschatzSilberschatz HenryHenry F. KorthF. Korth 04716946650471694665 ComputersComputers 944944 McGraw-HillMcGraw-Hill
  • 6. Table 1 problemsTable 1 problems  This table is not very efficient with storage.This table is not very efficient with storage.  This design does not protect data integrity.This design does not protect data integrity.  Third, this table does not scale well.Third, this table does not scale well.
  • 7. First Normal FormFirst Normal Form  In our Table 1, we have two violations ofIn our Table 1, we have two violations of First Normal Form:First Normal Form:  First, we have more than one author field,First, we have more than one author field,  Second, our subject field contains moreSecond, our subject field contains more than one piece of information. With morethan one piece of information. With more than one value in a single field, it would bethan one value in a single field, it would be very difficult to search for all books on avery difficult to search for all books on a given subject.given subject.
  • 8. First Normal TableFirst Normal Table  Table 2Table 2 TitleTitle AuthorAuthor ISBNISBN SubjectSubject PagesPages PublisherPublisher Database SystemDatabase System ConceptsConcepts AbrahamAbraham SilberschatzSilberschatz 00729588630072958863 MySQLMySQL 11681168 McGraw-HillMcGraw-Hill Database SystemDatabase System ConceptsConcepts Henry F. KorthHenry F. Korth 00729588630072958863 ComputersComputers 11681168 McGraw-HillMcGraw-Hill Operating SystemOperating System ConceptsConcepts Henry F. KorthHenry F. Korth 04716946650471694665 ComputersComputers 944944 McGraw-HillMcGraw-Hill Operating SystemOperating System ConceptsConcepts AbrahamAbraham SilberschatzSilberschatz 04716946650471694665 ComputersComputers 944944 McGraw-HillMcGraw-Hill
  • 9.  We now have two rows for a single book.We now have two rows for a single book. Additionally, we would be violating theAdditionally, we would be violating the Second Normal Form…Second Normal Form…  A better solution to our problem would beA better solution to our problem would be to separate the data into separate tables-to separate the data into separate tables- an Author table and a Subject table toan Author table and a Subject table to store our information, removing thatstore our information, removing that information from the Book table:information from the Book table:
  • 10. Subject_IDSubject_ID SubjectSubject 11 MySQLMySQL 22 ComputersComputers Author_IDAuthor_ID Last NameLast Name First NameFirst Name 11 SilberschatzSilberschatz AbrahamAbraham 22 KorthKorth HenryHenry ISBNISBN TitleTitle PagesPages PublisherPublisher 00729588630072958863 Database SystemDatabase System ConceptsConcepts 11681168 McGraw-HillMcGraw-Hill 04716946650471694665 Operating SystemOperating System ConceptsConcepts 944944 McGraw-HillMcGraw-Hill Subject Table Author Table Book Table
  • 11.  Each table has a primary key, used forEach table has a primary key, used for joining tables together when querying thejoining tables together when querying the data. A primary key value must be uniquedata. A primary key value must be unique with in the table (no two books can havewith in the table (no two books can have the same ISBN number), and a primarythe same ISBN number), and a primary key is also an index, which speeds upkey is also an index, which speeds up data retrieval based on the primary key.data retrieval based on the primary key.  Now to define relationships between theNow to define relationships between the tablestables
  • 12. RelationshipsRelationships ISBNISBN Author_IDAuthor_ID 00729588630072958863 11 00729588630072958863 22 04716946650471694665 11 04716946650471694665 22 ISBNISBN Subject_IDSubject_ID 00729588630072958863 11 00729588630072958863 22 04716946650471694665 22 Book_Author Table Book_Subject Table
  • 13. Second Normal FormSecond Normal Form  As the First Normal Form deals with redundancyAs the First Normal Form deals with redundancy of data across a horizontal row, Second Normalof data across a horizontal row, Second Normal Form (or 2NF) deals with redundancy of data inForm (or 2NF) deals with redundancy of data in vertical columns.vertical columns.  As stated earlier, the normal forms areAs stated earlier, the normal forms are progressive, so to achieve Second Normalprogressive, so to achieve Second Normal Form, the tables must already be in First NormalForm, the tables must already be in First Normal Form.Form.  The Book Table will be used for the 2NFThe Book Table will be used for the 2NF exampleexample
  • 14. 2NF Table2NF Table Publisher_IDPublisher_ID Publisher NamePublisher Name 11 McGraw-HillMcGraw-Hill ISBNISBN TitleTitle PagesPages Publisher_IDPublisher_ID 00729588630072958863 Database SystemDatabase System ConceptsConcepts 11681168 11 04716946650471694665 Operating SystemOperating System ConceptsConcepts 944944 11 Publisher Table Book Table
  • 15. 2NF2NF  Here we have a one-to-many relationshipHere we have a one-to-many relationship between the book table and the publisher. Abetween the book table and the publisher. A book has only one publisher, and a publisher willbook has only one publisher, and a publisher will publish many books. When we have a one-to-publish many books. When we have a one-to- many relationship, we place a foreign key in themany relationship, we place a foreign key in the Book Table, pointing to the primary key of theBook Table, pointing to the primary key of the Publisher Table.Publisher Table.  The other requirement for Second Normal FormThe other requirement for Second Normal Form is that you cannot have any data in a table with ais that you cannot have any data in a table with a composite key that does not relate to all portionscomposite key that does not relate to all portions of the composite key.of the composite key.
  • 16. Third Normal FormThird Normal Form  Third normal form (3NF) requires thatThird normal form (3NF) requires that there are no functional dependencies ofthere are no functional dependencies of non-key attributes on something othernon-key attributes on something other than a candidate key.than a candidate key.  A table is in 3NF if all of the non-primaryA table is in 3NF if all of the non-primary key attributes are mutually independentkey attributes are mutually independent  There should not be transitiveThere should not be transitive dependenciesdependencies
  • 17. Boyce-Codd Normal FormBoyce-Codd Normal Form  BCNF requires that the table is 3NF andBCNF requires that the table is 3NF and only determinants are the candidate keysonly determinants are the candidate keys