SlideShare a Scribd company logo
2023
Duhok Polytechnic University
Bardarash Technical Institute
Computer Network Dep
2st Stage (2022-2023)
Prepared By:
Janan H Sadiq
Lecturers Name:
Bshar R Ibrahim
Abstract:
 Database normalization
 First normal form
 Second normal form
 Third normal form
Database Normalization
Database Normalization is a process
and it should be carried out for every
database you design. The process of
taking a database design, and apply a
set of formal criteria and rules, is
called Normal Forms.
process:
1. The first normal form
2. The second normal form
3. The third normal form
Of the three normal forms, each subsequent normal form
depends on
normalization steps taken in the previous normal form. For
example, to
normalize a database using the second normal form, the
database must first be
in the first normal form.
The Following Are The Three Most Common
Normal Forms In The Normalization
1. The First Normal Form (1NF):
The first normal form requires that a table satisfies the
following conditions:
1. Rows are not ordered
2. Columns are not ordered
3. There is duplicated data
4. Row-and-column intersections always have a unique value
5. All columns are “regular” with no hidden values
In the following example, the first table clearly violates the 1
NF. It contains more
than one value for the Dept column. So, what we might do
then is go back to the
original way and instead start adding new columns, so,
Dept1, Dept2, and so on.
This is what’s called a repeating group, and there should be no repeating groups .
In order to bring this First Normal Form, split the table into the two tables. Let’s
take the department data out of the table and put it in the dept table. This has
the one-to-many relationship to the employee table.
Let’s take a look at the employee table:
Now, after normalization, the normalized tables Dept and Employee
looks like below:
Second Normal Form and Third Normal Form are all about the relationship
between the columns that are the keys and the other columns that aren’t the
key columns.
2.Second Normal Form (2NF):
An entity is in a second normal form if all of its attributes depend
on the whole primary key. So this means that the values in the
different columns have a dependency on the other columns.
1. The table must be already in 1 NF and all non-key columns of the tables must depend on the
PRIMARY KEY
2. The partial dependencies are removed and placed in a separate table
Note: Second Normal Form (2 NF) is only ever a problem when we’re using a
composite primary key. That is, a primary key made of two or more columns.
The following example, the relationship is established between the Employee
and Department tables.
In this example, the Title column is functionally dependent on Name and
Date columns. These two keys form a composite key. In this case, it only
depends on Name and partially dependent on the Date column. Let’s remove
the course details and form a separate table. Now, the course details are
based on the entire key. We are not going to use a composite key:
The third normal form states that you should eliminate fields in a table that do
not depend on the key.
A Table is already in 2 NF
Non-Primary key columns shouldn’t depend on the other non-Primary key
columns
There is no transitive functional dependency
Consider the following example, in the table employee; empID determines the
department ID of an employee, department ID determines the department
name. Therefore, the department name column indirectly dependent on the
empID column. So, it satisfies the transitive dependency. So this cannot be in
third normal form.
3.Third Normal Form (3NF):
In order to bring the table to 3 NF, we split the employee table into two.
Now, we can see the all non-key columns are fully functionally
dependent on the Primary key.
Although a fourth and fifth form does exist, most databases do
not aspire to use those levels because they take extra work and
they don’t truly impact the database functionality and improve
performance.
 https://www.home4t.com/2020/05/pi-network.html?m=
 http://knwe.org
 https://www.google.com/url?sa=t&source=web&rct=j&url=http://cir.dcs.uni-
pannon.hu/cikkek/Database_Normalization.pdf&ved=2ahUKEwj3vPOry9rwAhWxhv0HHZDkBYAQFjAAegQIBBAC&u
sg=AOvVaw1uc1a4c8qg36n3thU8SqqW
 https://www.google.com/url?sa=t&source=web&rct=j&url=http://www.csc.villanova.edu/~mdamian/Past/databasefa
13/notes/ch04-
Normalization.pdf&ved=2ahUKEwj3vPOry9rwAhWxhv0HHZDkBYAQFjABegQIAxAC&usg=AOvVaw24EjF2PkYwRZfr
3JwxZxv_
 https://www.google.com/url?sa=t&source=web&rct=j&url=https://www.researchgate.net/publication/333972824_P
roject-
Database_Normalization&ved=2ahUKEwj3vPOry9rwAhWxhv0HHZDkBYAQFjACegQIEBAC&usg=AOvVaw2ZDSnlGC
IjeQTfEXTme43Q
Resources

More Related Content

Similar to 1683368767418684.pdf

Assignment#11
Assignment#11Assignment#11
Assignment#11
Sunita Milind Dol
 
Db lec 06_new
Db lec 06_newDb lec 06_new
Db lec 06_new
Ramadan Babers, PhD
 
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NFNormalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Biplap Bhattarai
 
Normalization
NormalizationNormalization
Normalization
Ramesh 4
 
Dbms interview questions
Dbms interview questionsDbms interview questions
Dbms interview questions
ambika93
 
Normalization in Database
Normalization in DatabaseNormalization in Database
Normalization in Database
A. S. M. Shafi
 
Data normailazation
Data normailazationData normailazation
Data normailazation
Lalit Kale
 
Database Normalization.docx
Database Normalization.docxDatabase Normalization.docx
Database Normalization.docx
SHARMISTHAlearning
 
Data Modeling
Data ModelingData Modeling
Data Modeling
DrkhanchanaR
 
What is Database NormalizationExplain the guidelines for ensuring t.pdf
What is Database NormalizationExplain the guidelines for ensuring t.pdfWhat is Database NormalizationExplain the guidelines for ensuring t.pdf
What is Database NormalizationExplain the guidelines for ensuring t.pdf
arjunstores123
 
Database design normalization note and exercise
Database design normalization note and exerciseDatabase design normalization note and exercise
Database design normalization note and exercise
dilnawaz56788
 
Normalization.ppt
Normalization.pptNormalization.ppt
Normalization.ppt
NIDHISAHU71
 
Normalization
NormalizationNormalization
Normalization
Shakila Mahjabin
 
Database.ppt
Database.pptDatabase.ppt
Database.ppt
amuthadeepa
 
Normalization
NormalizationNormalization
Normalization
Wangu Thupa
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
Hitesh Mohapatra
 
Distributed database
Distributed databaseDistributed database
Distributed database
NasIr Irshad
 
Normalization of database tables
Normalization of database tablesNormalization of database tables
Normalization of database tables
Dhani Ahmad
 
Lecture 02-2-IIS.pptx
Lecture 02-2-IIS.pptxLecture 02-2-IIS.pptx
Lecture 02-2-IIS.pptx
Asadkhan47384
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
Arun Sharma
 

Similar to 1683368767418684.pdf (20)

Assignment#11
Assignment#11Assignment#11
Assignment#11
 
Db lec 06_new
Db lec 06_newDb lec 06_new
Db lec 06_new
 
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NFNormalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
 
Normalization
NormalizationNormalization
Normalization
 
Dbms interview questions
Dbms interview questionsDbms interview questions
Dbms interview questions
 
Normalization in Database
Normalization in DatabaseNormalization in Database
Normalization in Database
 
Data normailazation
Data normailazationData normailazation
Data normailazation
 
Database Normalization.docx
Database Normalization.docxDatabase Normalization.docx
Database Normalization.docx
 
Data Modeling
Data ModelingData Modeling
Data Modeling
 
What is Database NormalizationExplain the guidelines for ensuring t.pdf
What is Database NormalizationExplain the guidelines for ensuring t.pdfWhat is Database NormalizationExplain the guidelines for ensuring t.pdf
What is Database NormalizationExplain the guidelines for ensuring t.pdf
 
Database design normalization note and exercise
Database design normalization note and exerciseDatabase design normalization note and exercise
Database design normalization note and exercise
 
Normalization.ppt
Normalization.pptNormalization.ppt
Normalization.ppt
 
Normalization
NormalizationNormalization
Normalization
 
Database.ppt
Database.pptDatabase.ppt
Database.ppt
 
Normalization
NormalizationNormalization
Normalization
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Distributed database
Distributed databaseDistributed database
Distributed database
 
Normalization of database tables
Normalization of database tablesNormalization of database tables
Normalization of database tables
 
Lecture 02-2-IIS.pptx
Lecture 02-2-IIS.pptxLecture 02-2-IIS.pptx
Lecture 02-2-IIS.pptx
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 

1683368767418684.pdf

  • 1. 2023 Duhok Polytechnic University Bardarash Technical Institute Computer Network Dep 2st Stage (2022-2023) Prepared By: Janan H Sadiq Lecturers Name: Bshar R Ibrahim
  • 2. Abstract:  Database normalization  First normal form  Second normal form  Third normal form
  • 3. Database Normalization Database Normalization is a process and it should be carried out for every database you design. The process of taking a database design, and apply a set of formal criteria and rules, is called Normal Forms.
  • 4. process: 1. The first normal form 2. The second normal form 3. The third normal form Of the three normal forms, each subsequent normal form depends on normalization steps taken in the previous normal form. For example, to normalize a database using the second normal form, the database must first be in the first normal form. The Following Are The Three Most Common Normal Forms In The Normalization
  • 5. 1. The First Normal Form (1NF): The first normal form requires that a table satisfies the following conditions: 1. Rows are not ordered 2. Columns are not ordered 3. There is duplicated data 4. Row-and-column intersections always have a unique value 5. All columns are “regular” with no hidden values In the following example, the first table clearly violates the 1 NF. It contains more than one value for the Dept column. So, what we might do then is go back to the original way and instead start adding new columns, so, Dept1, Dept2, and so on.
  • 6. This is what’s called a repeating group, and there should be no repeating groups . In order to bring this First Normal Form, split the table into the two tables. Let’s take the department data out of the table and put it in the dept table. This has the one-to-many relationship to the employee table. Let’s take a look at the employee table:
  • 7. Now, after normalization, the normalized tables Dept and Employee looks like below:
  • 8. Second Normal Form and Third Normal Form are all about the relationship between the columns that are the keys and the other columns that aren’t the key columns. 2.Second Normal Form (2NF): An entity is in a second normal form if all of its attributes depend on the whole primary key. So this means that the values in the different columns have a dependency on the other columns. 1. The table must be already in 1 NF and all non-key columns of the tables must depend on the PRIMARY KEY 2. The partial dependencies are removed and placed in a separate table
  • 9. Note: Second Normal Form (2 NF) is only ever a problem when we’re using a composite primary key. That is, a primary key made of two or more columns. The following example, the relationship is established between the Employee and Department tables.
  • 10. In this example, the Title column is functionally dependent on Name and Date columns. These two keys form a composite key. In this case, it only depends on Name and partially dependent on the Date column. Let’s remove the course details and form a separate table. Now, the course details are based on the entire key. We are not going to use a composite key:
  • 11. The third normal form states that you should eliminate fields in a table that do not depend on the key. A Table is already in 2 NF Non-Primary key columns shouldn’t depend on the other non-Primary key columns There is no transitive functional dependency Consider the following example, in the table employee; empID determines the department ID of an employee, department ID determines the department name. Therefore, the department name column indirectly dependent on the empID column. So, it satisfies the transitive dependency. So this cannot be in third normal form. 3.Third Normal Form (3NF):
  • 12. In order to bring the table to 3 NF, we split the employee table into two.
  • 13. Now, we can see the all non-key columns are fully functionally dependent on the Primary key. Although a fourth and fifth form does exist, most databases do not aspire to use those levels because they take extra work and they don’t truly impact the database functionality and improve performance.
  • 14.  https://www.home4t.com/2020/05/pi-network.html?m=  http://knwe.org  https://www.google.com/url?sa=t&source=web&rct=j&url=http://cir.dcs.uni- pannon.hu/cikkek/Database_Normalization.pdf&ved=2ahUKEwj3vPOry9rwAhWxhv0HHZDkBYAQFjAAegQIBBAC&u sg=AOvVaw1uc1a4c8qg36n3thU8SqqW  https://www.google.com/url?sa=t&source=web&rct=j&url=http://www.csc.villanova.edu/~mdamian/Past/databasefa 13/notes/ch04- Normalization.pdf&ved=2ahUKEwj3vPOry9rwAhWxhv0HHZDkBYAQFjABegQIAxAC&usg=AOvVaw24EjF2PkYwRZfr 3JwxZxv_  https://www.google.com/url?sa=t&source=web&rct=j&url=https://www.researchgate.net/publication/333972824_P roject- Database_Normalization&ved=2ahUKEwj3vPOry9rwAhWxhv0HHZDkBYAQFjACegQIEBAC&usg=AOvVaw2ZDSnlGC IjeQTfEXTme43Q Resources