SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Database Sytem and Design
ITM Dept.
Second Stage
2022-2023
Database Normalization
A.Lecturer: Nareen O.Muhamad
Email: nareen.mohameed@dpu.edu.krd
Objectives
• Database Normalization
• Database Normal Forms
• First Normal Form- 1NF
• Second Normal Form- 2NF
• Third Normal Form- 3NF
What is database normalization?
• Database normalization is the process of organizing data to minimize data redundancy (data
duplication), which in turn ensures data consistency.
• Problems of Redundant data.
1. Disk space wastage.
2. Data inconsistency.
3. DML queries (Insert, Update, Delete) can become slow.
Problems of Redundant data
• Consider Employees table below. For every employee with in the same department, we are
repeating, all the 3 columns (DeptName, DeptHead and DeptLocation). Let's say for example,
if there 50 thousand employees in the IT department, we would have unnecessarily repeated
all the 3 department columns (DeptName, DeptHead and DeptLocation) data 50 thousand
times. The obvious problem with redundant data is the disk space wastage.
• Another common problem, is that data can become inconsistent.
For example, let's say, JOHN has resigned and we have a new department head (STEVE) for IT
department At present, there are 3 IT department rows in the table, and we need to update all of
them. Let's assume I updated only one, row and forgot to update the other 2 rows, then obviously, the
data becomes inconsistent
• Another problem, DML queries (Insert, update and
delete), could become slow, as there could many records and
columns to process.
To Reduce the data redundancy
• we can divide this large badly organized table into two (Employees and Departments), as
shown below. Now, we have reduced redundant department data. So, if we have to update
department head name, we only have one row to update, even if there are 10 million
employees in that department.
Database Normal Forms
• There are 6 normal forms, First Normal form (1NF) thru Sixth
Normal Form (6NF). Most databases are in third normal form
(3NF). There are certain rules, that each normal form should
follow.
First Normal Form (1NF)
• A table is said to be in 1NF, if
1. The data in each column should be atomic. No multiple values, separated by comma.
2. The table does not contain any repeating column groups.
3. Identify each record uniquely using primary key.
First Normal Form (1NF)
• In the table below, data in Employee column is not atomic. It contains
multiple employees separated by comma
Problems of Non Atomic Columns
it is not possible to SELECT, INSERT, UPDATE and DELETE just one employee.
First Normal Form (1NF)
• The 2nd rule of the first normal form is that, the table should not contain any repeating
column groups.
 Problems repeating column groups
• Table structure change required: if a department is going to add a new
employees.
• wasted disk space: Employee2 and Employee3 columns in the HR department
are NULL, as there is only one employee in this department.
First Normal Form (1NF)
To eliminate the repeating column groups, we are dividingthe table into 2.
The repeating Employee columns are moved into a separate table, with a
foreign key pointing to the primary key of the other table. We also, introduced
primary key to uniquely identify each record.
Second Normal Form (2NF)
• A table is said to be in 2NF, if
1.The table meets all the conditions of1NF.
2.Move redundant data to a separatetable.
3.Create relationship between these tables using foreign keys.
Second Normal Form (2NF)
The table below violates second normal form. There is lot of redundant data
in the table. Let's say, in my organization there are
• 100,000 employees and only 2 departments (IT & HR). Since we are storing DeptName,
DeptHead and DeptLocation columns also in the same table, all these columns should also
be repeated 100,000 times, which results in unnecessary duplicate on of data.
Second Normal Form (2NF)
• Now, to put this table in the second normal form, we need to break the table
into 2, and move the redundant department data (DeptName, DeptHead and
DeptLocation) into it's own table. To link the tables with each other, we use the
DeptId foreign key. The tables below are in 2NF.
Third Normal Form (3NF)
A table is said to be in 3NF, if the table
1. Meets all the conditions of 1NF and 2NF.
2. Does not contain columns (attributes) that are not fully dependent upon the primary
key.
Third Normal Form (3NF)
• The table below, violates third normal form, because AnnualSalary column is not
fully dependent on the primary key EmpId. The AnnualSalary is
• also dependent on the Salary column. In fact, to compute the AnnualSalary, we multiply
the Salary by 12. Since AnnualSalary is not fully dependent on the primary key, and it
can be computed, we can remove this column from the table, which then, will adhere to
3NF.
Third Normal Form (3NF)
 Let's look at another example of Third Normal Form violation. In the table below,
DeptHead column is not fully dependent on EmpId column. DeptHead is also dependent
on DeptName. So, this table is not in 3NF.
Third Normal Form (3NF)
To put this table in 3NF, we break this down into 2, and then move all the
columns that are not fully dependent on the primary keyto
• a separate table as shown below. This design is now in 3NF.
End Of Lecture

Weitere ähnliche Inhalte

Ähnlich wie Lecture 6.pptx

Normalization in Database
Normalization in DatabaseNormalization in Database
Normalization in DatabaseA. S. M. Shafi
 
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.pdfarjunstores123
 
Normalization
NormalizationNormalization
NormalizationRamesh 4
 
databaess.pptx
databaess.pptxdatabaess.pptx
databaess.pptxJanoakre
 
Normalization.pptx
Normalization.pptxNormalization.pptx
Normalization.pptxSreenivas R
 
Presentation on Normalization.pptx
Presentation on Normalization.pptxPresentation on Normalization.pptx
Presentation on Normalization.pptxkshipra sony
 
Normalization of database tables
Normalization of database tablesNormalization of database tables
Normalization of database tablesDhani Ahmad
 
Lecture 02-2-IIS.pptx
Lecture 02-2-IIS.pptxLecture 02-2-IIS.pptx
Lecture 02-2-IIS.pptxAsadkhan47384
 
Chapter Four Logical Database Design (Normalization).pptx
Chapter Four Logical Database Design (Normalization).pptxChapter Four Logical Database Design (Normalization).pptx
Chapter Four Logical Database Design (Normalization).pptxhaymanot taddesse
 
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 |5NFBiplap Bhattarai
 
Notes of Information technology
Notes of Information technology Notes of Information technology
Notes of Information technology Asif Jamal
 
Internal tables in sap
Internal tables in sapInternal tables in sap
Internal tables in sapDharma Raju
 

Ähnlich wie Lecture 6.pptx (20)

Jai dbms
Jai dbmsJai dbms
Jai dbms
 
Normalization in Database
Normalization in DatabaseNormalization in Database
Normalization in Database
 
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
 
Sap abap
Sap abapSap abap
Sap abap
 
Data Modeling
Data ModelingData Modeling
Data Modeling
 
Normalization
NormalizationNormalization
Normalization
 
Introduction to the Relational Model and SQL
Introduction to the Relational Model and SQLIntroduction to the Relational Model and SQL
Introduction to the Relational Model and SQL
 
Assignment#11
Assignment#11Assignment#11
Assignment#11
 
databaess.pptx
databaess.pptxdatabaess.pptx
databaess.pptx
 
Normalization.pptx
Normalization.pptxNormalization.pptx
Normalization.pptx
 
Presentation on Normalization.pptx
Presentation on Normalization.pptxPresentation on Normalization.pptx
Presentation on Normalization.pptx
 
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
 
Chapter Four Logical Database Design (Normalization).pptx
Chapter Four Logical Database Design (Normalization).pptxChapter Four Logical Database Design (Normalization).pptx
Chapter Four Logical Database Design (Normalization).pptx
 
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
 
Database Normalization.docx
Database Normalization.docxDatabase Normalization.docx
Database Normalization.docx
 
Notes of Information technology
Notes of Information technology Notes of Information technology
Notes of Information technology
 
Normalization case
Normalization caseNormalization case
Normalization case
 
Faq dbms
Faq dbmsFaq dbms
Faq dbms
 
Internal tables in sap
Internal tables in sapInternal tables in sap
Internal tables in sap
 

Mehr von DilanAlmsa

Stakeholder Infographics by Slidesgo.pptx
Stakeholder Infographics by Slidesgo.pptxStakeholder Infographics by Slidesgo.pptx
Stakeholder Infographics by Slidesgo.pptxDilanAlmsa
 
C++ Strings.ppt
C++ Strings.pptC++ Strings.ppt
C++ Strings.pptDilanAlmsa
 
Programming Lesson by Slidesgo.pptx
Programming Lesson by Slidesgo.pptxProgramming Lesson by Slidesgo.pptx
Programming Lesson by Slidesgo.pptxDilanAlmsa
 
lecture1-2023.pptx
lecture1-2023.pptxlecture1-2023.pptx
lecture1-2023.pptxDilanAlmsa
 
lecture-5 string.pptx
lecture-5 string.pptxlecture-5 string.pptx
lecture-5 string.pptxDilanAlmsa
 
Java22_1670144363.pptx
Java22_1670144363.pptxJava22_1670144363.pptx
Java22_1670144363.pptxDilanAlmsa
 

Mehr von DilanAlmsa (6)

Stakeholder Infographics by Slidesgo.pptx
Stakeholder Infographics by Slidesgo.pptxStakeholder Infographics by Slidesgo.pptx
Stakeholder Infographics by Slidesgo.pptx
 
C++ Strings.ppt
C++ Strings.pptC++ Strings.ppt
C++ Strings.ppt
 
Programming Lesson by Slidesgo.pptx
Programming Lesson by Slidesgo.pptxProgramming Lesson by Slidesgo.pptx
Programming Lesson by Slidesgo.pptx
 
lecture1-2023.pptx
lecture1-2023.pptxlecture1-2023.pptx
lecture1-2023.pptx
 
lecture-5 string.pptx
lecture-5 string.pptxlecture-5 string.pptx
lecture-5 string.pptx
 
Java22_1670144363.pptx
Java22_1670144363.pptxJava22_1670144363.pptx
Java22_1670144363.pptx
 

Kürzlich hochgeladen

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 

Kürzlich hochgeladen (20)

INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 

Lecture 6.pptx

  • 1. Database Sytem and Design ITM Dept. Second Stage 2022-2023 Database Normalization A.Lecturer: Nareen O.Muhamad Email: nareen.mohameed@dpu.edu.krd
  • 2. Objectives • Database Normalization • Database Normal Forms • First Normal Form- 1NF • Second Normal Form- 2NF • Third Normal Form- 3NF
  • 3. What is database normalization? • Database normalization is the process of organizing data to minimize data redundancy (data duplication), which in turn ensures data consistency. • Problems of Redundant data. 1. Disk space wastage. 2. Data inconsistency. 3. DML queries (Insert, Update, Delete) can become slow.
  • 4. Problems of Redundant data • Consider Employees table below. For every employee with in the same department, we are repeating, all the 3 columns (DeptName, DeptHead and DeptLocation). Let's say for example, if there 50 thousand employees in the IT department, we would have unnecessarily repeated all the 3 department columns (DeptName, DeptHead and DeptLocation) data 50 thousand times. The obvious problem with redundant data is the disk space wastage.
  • 5. • Another common problem, is that data can become inconsistent. For example, let's say, JOHN has resigned and we have a new department head (STEVE) for IT department At present, there are 3 IT department rows in the table, and we need to update all of them. Let's assume I updated only one, row and forgot to update the other 2 rows, then obviously, the data becomes inconsistent
  • 6. • Another problem, DML queries (Insert, update and delete), could become slow, as there could many records and columns to process.
  • 7. To Reduce the data redundancy • we can divide this large badly organized table into two (Employees and Departments), as shown below. Now, we have reduced redundant department data. So, if we have to update department head name, we only have one row to update, even if there are 10 million employees in that department.
  • 8. Database Normal Forms • There are 6 normal forms, First Normal form (1NF) thru Sixth Normal Form (6NF). Most databases are in third normal form (3NF). There are certain rules, that each normal form should follow.
  • 9. First Normal Form (1NF) • A table is said to be in 1NF, if 1. The data in each column should be atomic. No multiple values, separated by comma. 2. The table does not contain any repeating column groups. 3. Identify each record uniquely using primary key.
  • 10. First Normal Form (1NF) • In the table below, data in Employee column is not atomic. It contains multiple employees separated by comma Problems of Non Atomic Columns it is not possible to SELECT, INSERT, UPDATE and DELETE just one employee.
  • 11. First Normal Form (1NF) • The 2nd rule of the first normal form is that, the table should not contain any repeating column groups.  Problems repeating column groups • Table structure change required: if a department is going to add a new employees. • wasted disk space: Employee2 and Employee3 columns in the HR department are NULL, as there is only one employee in this department.
  • 12. First Normal Form (1NF) To eliminate the repeating column groups, we are dividingthe table into 2. The repeating Employee columns are moved into a separate table, with a foreign key pointing to the primary key of the other table. We also, introduced primary key to uniquely identify each record.
  • 13. Second Normal Form (2NF) • A table is said to be in 2NF, if 1.The table meets all the conditions of1NF. 2.Move redundant data to a separatetable. 3.Create relationship between these tables using foreign keys.
  • 14. Second Normal Form (2NF) The table below violates second normal form. There is lot of redundant data in the table. Let's say, in my organization there are • 100,000 employees and only 2 departments (IT & HR). Since we are storing DeptName, DeptHead and DeptLocation columns also in the same table, all these columns should also be repeated 100,000 times, which results in unnecessary duplicate on of data.
  • 15. Second Normal Form (2NF) • Now, to put this table in the second normal form, we need to break the table into 2, and move the redundant department data (DeptName, DeptHead and DeptLocation) into it's own table. To link the tables with each other, we use the DeptId foreign key. The tables below are in 2NF.
  • 16. Third Normal Form (3NF) A table is said to be in 3NF, if the table 1. Meets all the conditions of 1NF and 2NF. 2. Does not contain columns (attributes) that are not fully dependent upon the primary key.
  • 17. Third Normal Form (3NF) • The table below, violates third normal form, because AnnualSalary column is not fully dependent on the primary key EmpId. The AnnualSalary is • also dependent on the Salary column. In fact, to compute the AnnualSalary, we multiply the Salary by 12. Since AnnualSalary is not fully dependent on the primary key, and it can be computed, we can remove this column from the table, which then, will adhere to 3NF.
  • 18. Third Normal Form (3NF)  Let's look at another example of Third Normal Form violation. In the table below, DeptHead column is not fully dependent on EmpId column. DeptHead is also dependent on DeptName. So, this table is not in 3NF.
  • 19. Third Normal Form (3NF) To put this table in 3NF, we break this down into 2, and then move all the columns that are not fully dependent on the primary keyto • a separate table as shown below. This design is now in 3NF.