SlideShare a Scribd company logo
ADAMAS UNIVERSITY
• Name- Amit Maity
• Roll No- PG/02/MCA/2023/029
• Registration No- AU/2023/0010861
• Course- MCA
• Subject- DBMS
• Topic- Normalization, 1NF & 2NF
INDEX
• What is Normalization?
• Types of Normalization
• First Normal Form (1NF)
• Second Normal Form (2NF)
• Normalization is the process of organizing the data in
the database.
• Normalization is used to minimize the redundancy from
a relation or set of relations. It is also used to eliminate
undesirable characteristics like Insertion, Update, and
Deletion Anomalies.
• Normalization divides the larger table into smaller and
links them using relationships.
• The normal form is used to reduce redundancy from the
database table.
What is Normalization?
• Types of normalization based on the amount of
redundancy in the database.
• Various levels of normalization are:
– First Normal Form (1NF)
– Second Normal Form (2NF)
– Third Normal Form (3NF)
– Boyce-Codd Normal Form (BCNF)
– Fourth Normal Form (4NF)
– Fifth Normal Form (5NF)
– Domain Key Normal Form (DKNF)
Types of Normalization
Redundancy
Number
of
Tables
Most databases should be 3NF or BCNF in order to avoid
the database anomalies.
Complexity
A table is considered to be in 1NF if all the fields contain
only scalar values (as opposed to list of values).
Example (Not 1NF)
First Normal Form (1NF)
Author and AuPhone columns are not scalar
0-321-32132-1 Balloon Sleepy,
Snoopy,
Grumpy
321-321-1111,
232-234-1234,
665-235-6532
Small House 714-000-0000 $34.00
0-55-123456-9 Main Street Jones,
Smith
123-333-3333,
654-223-3455
Small House 714-000-0000 $22.95
0-123-45678-0 Ulysses Joyce 666-666-6666 Alpha Press 999-999-9999 $34.00
1-22-233700-0 Visual
Basic
Roman 444-444-4444 Big House 123-456-7890 $25.00
ISBN Title AuName AuPhone PubName PubPhone Price
1. Place all items that appear in the repeating group in a
new table
2. Designate a primary key for each new table produced.
3. Duplicate in the new table the primary key of the table
from which the repeating group was extracted or vice
versa.
Example (1NF)
1NF - Decomposition
0-321-32132-1 Balloon Small House 714-000-0000 $34.00
0-55-123456-9 Main Street Small House 714-000-0000 $22.95
0-123-45678-0 Ulysses Alpha Press 999-999-9999 $34.00
1-22-233700-0 Visual
Basic
Big House 123-456-7890 $25.00
ISBN Title PubName PubPhone Price
ISBN AuName AuPhone
0-123-45678-0 Joyce 666-666-6666
1-22-233700-0 Roman 444-444-4444
0-55-123456-9 Smith 654-223-3455
0-55-123456-9 Jones 123-333-3333
0-321-32132-1 Grumpy 665-235-6532
0-321-32132-1 Snoopy 232-234-1234
0-321-32132-1 Sleepy 321-321-1111
1. If one set of attributes in a table determines another
set of attributes in the table, then the second set of
attributes is said to be functionally dependent on the
first set of attributes.
Example 1
Functional Dependencies
0-321-32132-1 Balloon $34.00
0-55-123456-9 Main Street $22.95
0-123-45678-0 Ulysses $34.00
1-22-233700-0 Visual
Basic
$25.00
ISBN Title Price Table Scheme: {ISBN, Title, Price}
Functional Dependencies: {ISBN}  {Title}
{ISBN} 
{Price}
Example 2
Functional Dependencies
1 Big House 999-999-9999
2 Small House 123-456-7890
3 Alpha Press 111-111-1111
PubID PubName PubPhone Table Scheme: {PubID, PubName, PubPhone}
Functional Dependencies: {PubId}  {PubPhone}
{PubId} 
{PubName}
{PubName, PubPhone} 
{PubID}
AuID AuName AuPhone
6 Joyce 666-666-6666
7 Roman 444-444-4444
5 Smith 654-223-3455
4 Jones 123-333-3333
3 Grumpy 665-235-6532
2 Snoopy 232-234-1234
1 Sleepy 321-321-1111
Example 3
Table Scheme: {AuID, AuName, AuPhone}
Functional Dependencies: {AuId}  {AuPhone}
{AuId} 
{AuName}
{AuName, AuPhone}  {AuID}
For a table to be in 2NF, there are two requirements
– The database is in first normal form
– All nonkey attributes in the table must be functionally dependent on the
entire primary key
Note: Remember that we are dealing with non-key attributes
Example 1 (Not 2NF)
Scheme  {Title, PubId, AuId, Price, AuAddress}
1. Key  {Title, PubId, AuId}
2. {Title, PubId, AuID}  {Price}
3. {AuID}  {AuAddress}
4. AuAddress does not belong to a key
5. AuAddress functionally depends on AuId which is a subset of a key
Second Normal Form
(2NF)
1. If a data item is fully functionally dependent on only a part of the
primary key, move that data item and that part of the primary
key to a new table.
2. If other data items are functionally dependent on the same part
of the key, place them in the new table also
3. Make the partial primary key copied from the original table the
primary key for the new table. Place all items that appear in the
repeating group in a new table
Example 1 (Convert to 2NF)
Old Scheme  {Title, PubId, AuId, Price, AuAddress}
New Scheme  {Title, PubId, AuId, Price}
New Scheme  {AuId, AuAddress}
2NF - Decomposition
THANK
YOU

More Related Content

PPT
Unit 3 normalization.ppt;lmf;mgsd'gmsdf;lgmsdflgmsdflkgsd
PPT
RDBMS Normal Forms Normalization Dependnency
PPT
normalization.ppt fgnbftnhgkdnghtnhnbkfnbolhtlhtjm;dsbdt.htmjhnm
PPT
normalization normalization normalization normalization normalization normali...
PPT
normalization.ppt
PPT
normalization.ppt
PPT
Database Normalization.ppt
PPT
normalization.ppt
Unit 3 normalization.ppt;lmf;mgsd'gmsdf;lgmsdflgmsdflkgsd
RDBMS Normal Forms Normalization Dependnency
normalization.ppt fgnbftnhgkdnghtnhnbkfnbolhtlhtjm;dsbdt.htmjhnm
normalization normalization normalization normalization normalization normali...
normalization.ppt
normalization.ppt
Database Normalization.ppt
normalization.ppt

Similar to normalization.pptx, DBMS Normalization First Normal Form and Second Normal Form (20)

PPT
normalization-Normalization -Process of Divide Tables
PPT
normalization in Database Management Systems.ppt
PPT
normaliyuhhggtttttyyuiiiytttttttzation.ppt
PPT
Normalization
PPT
Database normalization is a systematic process used in database design to org...
PPT
Normalization
PPTX
normalisation jdsuhduswwhdusw cdscsacasc.pptx
PPTX
Normalization of database from first normal form to 5th normal form
 
PPT
Normalization.ppt
PPT
Bsc cs ii-dbms-u-iv-normalization
PPTX
Unit 3 dbms
PPT
Mca ii-dbms-u-iv-structured query language
PPTX
Kumar lav
PPT
Normalization of database tables
PDF
Normalization
PPT
Normalisation - 2nd normal form
PPT
Normalization
PPT
Normalization
PPTX
SS3 NORMALISATION HANDOUT EASY TO UNDERSTAND(1).pptx
normalization-Normalization -Process of Divide Tables
normalization in Database Management Systems.ppt
normaliyuhhggtttttyyuiiiytttttttzation.ppt
Normalization
Database normalization is a systematic process used in database design to org...
Normalization
normalisation jdsuhduswwhdusw cdscsacasc.pptx
Normalization of database from first normal form to 5th normal form
 
Normalization.ppt
Bsc cs ii-dbms-u-iv-normalization
Unit 3 dbms
Mca ii-dbms-u-iv-structured query language
Kumar lav
Normalization of database tables
Normalization
Normalisation - 2nd normal form
Normalization
Normalization
SS3 NORMALISATION HANDOUT EASY TO UNDERSTAND(1).pptx
Ad

Recently uploaded (20)

PPTX
Database Infoormation System (DBIS).pptx
PPTX
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
PPTX
Qualitative Qantitative and Mixed Methods.pptx
PDF
.pdf is not working space design for the following data for the following dat...
PPTX
Acceptance and paychological effects of mandatory extra coach I classes.pptx
PPTX
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
PPTX
Introduction to Knowledge Engineering Part 1
PPTX
Computer network topology notes for revision
PDF
annual-report-2024-2025 original latest.
PPTX
Introduction-to-Cloud-ComputingFinal.pptx
PPTX
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
PPTX
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
PDF
Fluorescence-microscope_Botany_detailed content
PPT
Miokarditis (Inflamasi pada Otot Jantung)
PDF
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
PPT
Quality review (1)_presentation of this 21
PPTX
Market Analysis -202507- Wind-Solar+Hybrid+Street+Lights+for+the+North+Amer...
PPTX
Introduction to machine learning and Linear Models
PDF
[EN] Industrial Machine Downtime Prediction
Database Infoormation System (DBIS).pptx
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
Qualitative Qantitative and Mixed Methods.pptx
.pdf is not working space design for the following data for the following dat...
Acceptance and paychological effects of mandatory extra coach I classes.pptx
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
Introduction to Knowledge Engineering Part 1
Computer network topology notes for revision
annual-report-2024-2025 original latest.
Introduction-to-Cloud-ComputingFinal.pptx
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
Fluorescence-microscope_Botany_detailed content
Miokarditis (Inflamasi pada Otot Jantung)
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
Quality review (1)_presentation of this 21
Market Analysis -202507- Wind-Solar+Hybrid+Street+Lights+for+the+North+Amer...
Introduction to machine learning and Linear Models
[EN] Industrial Machine Downtime Prediction
Ad

normalization.pptx, DBMS Normalization First Normal Form and Second Normal Form

  • 1. ADAMAS UNIVERSITY • Name- Amit Maity • Roll No- PG/02/MCA/2023/029 • Registration No- AU/2023/0010861 • Course- MCA • Subject- DBMS • Topic- Normalization, 1NF & 2NF
  • 2. INDEX • What is Normalization? • Types of Normalization • First Normal Form (1NF) • Second Normal Form (2NF)
  • 3. • Normalization is the process of organizing the data in the database. • Normalization is used to minimize the redundancy from a relation or set of relations. It is also used to eliminate undesirable characteristics like Insertion, Update, and Deletion Anomalies. • Normalization divides the larger table into smaller and links them using relationships. • The normal form is used to reduce redundancy from the database table. What is Normalization?
  • 4. • Types of normalization based on the amount of redundancy in the database. • Various levels of normalization are: – First Normal Form (1NF) – Second Normal Form (2NF) – Third Normal Form (3NF) – Boyce-Codd Normal Form (BCNF) – Fourth Normal Form (4NF) – Fifth Normal Form (5NF) – Domain Key Normal Form (DKNF) Types of Normalization Redundancy Number of Tables Most databases should be 3NF or BCNF in order to avoid the database anomalies. Complexity
  • 5. A table is considered to be in 1NF if all the fields contain only scalar values (as opposed to list of values). Example (Not 1NF) First Normal Form (1NF) Author and AuPhone columns are not scalar 0-321-32132-1 Balloon Sleepy, Snoopy, Grumpy 321-321-1111, 232-234-1234, 665-235-6532 Small House 714-000-0000 $34.00 0-55-123456-9 Main Street Jones, Smith 123-333-3333, 654-223-3455 Small House 714-000-0000 $22.95 0-123-45678-0 Ulysses Joyce 666-666-6666 Alpha Press 999-999-9999 $34.00 1-22-233700-0 Visual Basic Roman 444-444-4444 Big House 123-456-7890 $25.00 ISBN Title AuName AuPhone PubName PubPhone Price
  • 6. 1. Place all items that appear in the repeating group in a new table 2. Designate a primary key for each new table produced. 3. Duplicate in the new table the primary key of the table from which the repeating group was extracted or vice versa. Example (1NF) 1NF - Decomposition 0-321-32132-1 Balloon Small House 714-000-0000 $34.00 0-55-123456-9 Main Street Small House 714-000-0000 $22.95 0-123-45678-0 Ulysses Alpha Press 999-999-9999 $34.00 1-22-233700-0 Visual Basic Big House 123-456-7890 $25.00 ISBN Title PubName PubPhone Price ISBN AuName AuPhone 0-123-45678-0 Joyce 666-666-6666 1-22-233700-0 Roman 444-444-4444 0-55-123456-9 Smith 654-223-3455 0-55-123456-9 Jones 123-333-3333 0-321-32132-1 Grumpy 665-235-6532 0-321-32132-1 Snoopy 232-234-1234 0-321-32132-1 Sleepy 321-321-1111
  • 7. 1. If one set of attributes in a table determines another set of attributes in the table, then the second set of attributes is said to be functionally dependent on the first set of attributes. Example 1 Functional Dependencies 0-321-32132-1 Balloon $34.00 0-55-123456-9 Main Street $22.95 0-123-45678-0 Ulysses $34.00 1-22-233700-0 Visual Basic $25.00 ISBN Title Price Table Scheme: {ISBN, Title, Price} Functional Dependencies: {ISBN}  {Title} {ISBN}  {Price}
  • 8. Example 2 Functional Dependencies 1 Big House 999-999-9999 2 Small House 123-456-7890 3 Alpha Press 111-111-1111 PubID PubName PubPhone Table Scheme: {PubID, PubName, PubPhone} Functional Dependencies: {PubId}  {PubPhone} {PubId}  {PubName} {PubName, PubPhone}  {PubID} AuID AuName AuPhone 6 Joyce 666-666-6666 7 Roman 444-444-4444 5 Smith 654-223-3455 4 Jones 123-333-3333 3 Grumpy 665-235-6532 2 Snoopy 232-234-1234 1 Sleepy 321-321-1111 Example 3 Table Scheme: {AuID, AuName, AuPhone} Functional Dependencies: {AuId}  {AuPhone} {AuId}  {AuName} {AuName, AuPhone}  {AuID}
  • 9. For a table to be in 2NF, there are two requirements – The database is in first normal form – All nonkey attributes in the table must be functionally dependent on the entire primary key Note: Remember that we are dealing with non-key attributes Example 1 (Not 2NF) Scheme  {Title, PubId, AuId, Price, AuAddress} 1. Key  {Title, PubId, AuId} 2. {Title, PubId, AuID}  {Price} 3. {AuID}  {AuAddress} 4. AuAddress does not belong to a key 5. AuAddress functionally depends on AuId which is a subset of a key Second Normal Form (2NF)
  • 10. 1. If a data item is fully functionally dependent on only a part of the primary key, move that data item and that part of the primary key to a new table. 2. If other data items are functionally dependent on the same part of the key, place them in the new table also 3. Make the partial primary key copied from the original table the primary key for the new table. Place all items that appear in the repeating group in a new table Example 1 (Convert to 2NF) Old Scheme  {Title, PubId, AuId, Price, AuAddress} New Scheme  {Title, PubId, AuId, Price} New Scheme  {AuId, AuAddress} 2NF - Decomposition

Editor's Notes

  • #5: Having scalar values also means that all instances of a record type must contain the same number of fields. A table not in first normal form is called un normalized
  • #6: 1. The designated key will be the primary key of the original table concatenated with one or more data items from the new table. For the first table the primary key is ISBN For the second table the primary key is ISBN + Author Name
  • #7: Notes to Instructor: Need more rigor in the functional dependencies. With a few examples. May be create a class assignment for functional dependencies.
  • #10: If there is a table with columns A,B,C,D with Primary Key (A,B) & D is dependant on A (alone) then to be 2NF, you should reduce (split) tables as: Table with columns A,D with Primary Key (A) Table with columns A,B,C with Primary Key (A,B)