0% found this document useful (0 votes)
10 views16 pages

Understanding 1NF, 2NF, 3NF Normalization

Uploaded by

maypyaesonewin22
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views16 pages

Understanding 1NF, 2NF, 3NF Normalization

Uploaded by

maypyaesonewin22
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

THIRD YEAR

IT-32016 Database
Management Systems
CHAPTER -10 FURTHER NORMALIZATION I:
1NF, 2NF AND 3NF

Presented by 1
THIRD YEAR

Expected Outcomes :To comprehend how the relations relates each other by using SQL language, how to
depend from one relation to others, how to normalize relations

Aim

• To process efficiently organizing data in the database

Objectives

• To eliminate redundant data (storing the same data in more than one table)
• To ensure data dependencies make sense (only storing related data in a table)

2
THIRD YEAR

Today's Argendas

 What is normalization? Why normalization is used?


 Somes types of normalisations
 1NF
 2NF
 3NF
 Questions & Answers
 Conclusion

3
THIRD YEAR

What is normalization? Why normalization is used?

Some of the normal forms are expressed as follow


diagram:
 Normalization is a process of organizing the data in
database to avoid data redundancy (repetition).

 Normalization is used to minimize the redundancy


from a relation or set of relations (e.g undesirable
characteristics like Insertion, Update and Deletion
Anomalies).

4
THIRD YEAR

1NF, 2NF and 3NF

 1NF is the most basic of normal forms - each cell in a table must contain only one piece of
information, and there can be no duplicate rows.

 2NF and 3NF are all about being dependent on the primary key. A primary key can be made up of
multiple columns.

5
THIRD YEAR

1st Normal Form


Example
How do we bring an unnormalized table into first
normal form? Consider the following example:

 This table is not in first normal form because the


[Knowledge] column can contain multiple values.

 To bring this table to first normal form, now we


have the resulting table as shown as the right
side below.

6
THIRD YEAR

2nd Normal Form


Example
How do we bring a first normal form table into second normal form? Consider the following example:

The following functional dependencies exist:

1. The attribute ProfessorName is functionally dependent on attribute IDProf (IDProf --> ProfessorName)

2. The attribute StudentName is functionally dependent on IDSt (IDSt --> StudentName)

3. The attribute Grade is fully functional dependent on IDSt and IDProf (IDSt, IDProf --> Grade)

7
THIRD YEAR

2nd Normal Form


Example

Grade
ID St ID Prof Grade
1 3 5
2 2 4
3 1 6
8
THIRD YEAR

3rd Normal Form


Example
Third normal form:
A relation is in third normal form if it is in 2NF and no non key attribute is transitively dependent on the primary key.

A bank uses the following relation:

Vendor(ID, Name, Account_No, Bank_Code_No, Bank)The attribute ID is the identification key. All attributes are single
valued (1NF). The table is also in 2NF.

The following dependencies exist:

1. Name, Account_No, Bank_Code_No are functionally dependent on ID (ID --> Name, Account_No,
Bank_Code_No)

2. Bank is functionally dependent on Bank_Code_No (Bank_Code_No --> Bank)

9
THIRD YEAR

3rd Normal Form


Example

• The table in this example is in 1NF and in 2NF.

• But there is a transitive dependency between Bank_Code_No


and Bank, because Bank_Code_No is not the primary key of
this relation.

• To get to the third normal form (3NF), we have to put the


bank name in a separate table together with the clearing
Example of Third Normal Form number to identify it.
10
THIRD YEAR

Problems
[Link] the 1NF using the following Students table. You can normalize "Student Table".
Student table
Student Name Course Title
Mg Aung Aung Computer Science, Mathematics, Physics

Mg Zaw Zaw Physics, Chemistry

Ma Nwe Nwe Music

Ma Nanda Bio-T, Physics

Mg Htun Physics, Chemistry

11
THIRD YEAR

Problems
1. Simplify the 2NF using the following 1NF " Faculty" table. You can normalize "Faculty Table" and
"Subject Table".
Faculty table
[Link] Faculty Code Faculty Name DOB Subject Hours
1 100 U Maung 6-6-1981 PHP 16

2 100 U Maung 6-6-1981 JAVA 8

3 100 U Maung 6-6-1981 DSP 12

4 101 Daw Nadi 6-7-1978 C++ 16


5 101 Daw Nadi 6-7-1978 DC 10

6 101 Daw Nadi 6-7-1978 DS 8

12
THIRD YEAR

Problems
1. Simplify the 3NF using the following "Score " table. You can normalize "Score Table" and "Exam
Table".
Score-Table

score-id student-id subject-id average marks exam name total marks


A III_IT_1 IT32012 75 Practical 375

A III_IT_2 IT32016 80 Tutorial 400

13
THIRD YEAR

Conclusion

• I hope to comprehend examples of 1NF, 2NF, 3NF of Database normalization.

• BCNF , 4NF and 5NF will explain next teacher.

• After comprehending them, and then give me answers.

• All students can run my problems using convenient tools such as Oracle, MySQl, Xampp.

14
THIRD YEAR

REFERENCES

• An Introduction To Database Systems, C. J. Date, Sixth Edition


• Youtube
• [Link]

15
THIRD YEAR

THANK FOR WATCHING Designed By Dr. AZCM

16

You might also like