SlideShare a Scribd company logo
2
Most read
3
Most read
4
Most read
NORMALIZATION
Instructor:
Mehwashma Amir
E-R Model and Normalization/ Session 2
1
SQL
Server
2012
© Aptech Ltd.
SQL
Server
2012
2E-R Model and Normalization/ Session 2
 Initially, all databases are characterized by large number of columns and records.
 This approach has certain drawbacks.
 The following table consist of details of the employees and the project they are
working on.
Repetition Anomaly
 The data such as Project_id, Project_name, Grade, and Salary repeat
many times.
 This repetition hampers both, performance during retrieval of data and the storage
capacity.
 This repetition of data is called the repetition anomaly.
SQL
Server
2012
© Aptech Ltd.
SQL
Server
2012
3E-R Model and Normalization/ Session 2
 The repetition is shown in the following table with the help of shaded cells:
Insertion Anomaly
 Suppose the department recruits a new employee named Ann.
 Consider that Ann has not been assigned any project. Insertion of her details in the
table would leave columns Project_id and Project_name empty.
 Leaving columns blank could lead to problems later.
 Anomalies created by such insertions are called insertion anomalies as shown in
the following table:
SQL
Server
2012
© Aptech Ltd.
SQL
Server
2012
4E-R Model and Normalization/ Session 2
Deletion Anomaly
 Suppose, Bob is relieved from the project MAGNUM.
 Deleting the record deletes Bob's Emp_no, Grade, and Salary details too.
 This loss of data is harmful as all of Bob's personal details are also lost.
 This kind of loss of data due to deletion is called deletion anomaly as can be seen in
the following table:
Updating Anomaly
 Suppose John was given a hike in Salary or John was demoted.
 The change in John's Salary or Grade needs to be reflected in all projects John
works for.
 This problem in updating all the occurrences is called updating anomaly.
SQL
Server
2012
© Aptech Ltd.
SQL
Server
2012
5E-R Model and Normalization/ Session 2
The Department Employee Details table is called an unnormalized table.
These drawbacks lead to the need for normalization.
Normalization is the process of removing unwanted redundancy and dependencies.
Initially, Codd (1972) presented three normal forms (1NF, 2NF, and 3NF), all based
on dependencies among the attributes of a relation.
The fourth and fifth normal forms are based on multi value and join dependencies
and were proposed later.
SQL
Server
2012
© Aptech Ltd.
SQL
Server
2012
6E-R Model and Normalization/ Session 2
1
• Create separate tables for each group of related data.
2
• The table columns must have atomic values.
3
• All the key attributes must be identified.
 In order to achieve the first normal form, following steps need to be performed:
 Consider the Employee Project Details table as follows:
 The table has data related to projects and employees.
 The table needs to be split into two tables, that is, a Project Details table
and an Employee Details table.
 The table columns, Project_id and Project_names, have multiple values.
SQL
Server
2012
© Aptech Ltd.
SQL
Server
2012
7E-R Model and Normalization/ Session 2
 The data needs to be split over different rows.
 The resultant tables are Project Details and Employee Details as
follows:
Project Details
Employee Details
 The Project_id attribute is the primary key for the Project Details table.
 The Emp_no attribute is the primary key for the Employee Details table.
 Therefore, in first normal form, the initial Employee Project Details table
has been reduced to the Project Details and Employee Details tables.
SQL
Server
2012
© Aptech Ltd.
SQL
Server
2012
8E-R Model and Normalization/ Session 2
 The tables are said to be in second normal form if:
 Partial dependency means a non-key attribute should not be partially dependent
on more than one key attribute.
 The Project Details and Employee Details tables do not exhibit any
partial dependencies.
 The Project_name is dependent only on Project_id and Emp_name,
Grade, and Salary are dependant only on Emp_no.
 The tables also need to be related through foreign keys.
 A third table, named Employee Project Details, is created with only two
columns, Project_id and Emp_no.
They meet the requirements of the first normal form.
There are no partial dependencies in the tables.
The tables are related through foreign keys.
SQL
Server
2012
© Aptech Ltd.
SQL
Server
2012
9E-R Model and Normalization/ Session 2
 So, the project and employee details tables on conversion to second normal form
generates tables Project Details, Employee Details, and Employee
Project Details as follows:
Project Details
Employee Project Details
Employee Details
 The attributes, Emp_no and Project_id, of the Employee Project
Details table combine together to form the primary key.
 Such primary keys are called composite primary keys.
SQL
Server
2012
© Aptech Ltd.
SQL
Server
2012
10E-R Model and Normalization/ Session 2
 To achieve the third normal form:
The tables should meet the requirements of the second normal form
The tables should not have transitive dependencies in them
 The Project Details, Employee Details, and Employee Project
Details tables are in second normal form.
 If an attribute can be determined by another non-key attribute, it is called a
transitive dependency.
 That is, every non-key attribute should be determined by the key attribute only.
 If a non-key attribute can be determined by another non-key attribute, it needs to
put into another table.
SQL
Server
2012
© Aptech Ltd.
SQL
Server
2012
11E-R Model and Normalization/ Session 2
 On observing the different tables, it is seen that the Project Details and
Employee Project Details tables do not exhibit any such transitive
dependencies.
 The non-key attributes are totally determined by the key attributes.
 Project_name is only determined by Project_number.
 On further scrutinizing the Employee Details table, a certain inconsistency is
seen.
 The attribute Salary is determined by the attribute Grade and not the key
attribute Emp_no.
 Thus, this transitive dependency needs to be removed.
 The Employee Details table can be split into Employee Details and
Grade Salary Details tables as follows:
Employee Details Grade Salary Details
SQL
Server
2012
© Aptech Ltd.
SQL
Server
2012
12E-R Model and Normalization/ Session 2
 Thus, at the end of the three normalization stages, the initial Employee
Project Details table has been reduced to the Project Details,
Employee Project Details, Employee Details, and Grade Salary
Details tables as follows:
Employee Details Grade Salary Details
Project Details
Employee Project Details
SQL
Server
2012
© Aptech Ltd.
SQL
Server
2012
13E-R Model and Normalization/ Session 2
By normalizing a database, redundancy is reduced.
This, in turn, reduces the storage requirements for the database and ensures data
integrity.
However, it has following drawbacks:
Complex join queries may have to be written often to combine the data in
multiple tables.
Joins may practically involve more than three tables depending on the need
for information.
 If such joins are used very often, the performance of the database will become very
poor.
 In such cases, storing a few fields redundantly can be ignored to increase the
performance of the database.
 The databases that possess such minor redundancies in order to increase
performance are called denormalized databases and the process of doing so is
called denormalization.

More Related Content

What's hot (20)

PPT
2. Entity Relationship Model in DBMS
koolkampus
 
PDF
Data administration
Prof. Erwin Globio
 
PPTX
Library management (use case diagram Software engineering)
kiran Patel
 
PDF
Expense tracker management system project report.pdf
Kamal Acharya
 
PPTX
Relational databases
Fiddy Prasetiya
 
PDF
Dbms notes
Prof. Dr. K. Adisesha
 
PPTX
Introduction to Object Oriented databases
Dr. C.V. Suresh Babu
 
PPTX
Relational Database Design
Archit Saxena
 
PDF
300+ top database management system questions and answers 2020
tadeseguchi
 
PPTX
Data model and entity relationship
Knowledge Center Computer
 
DOCX
Software requirements specification of Library Management System
Soumili Sen
 
PPTX
Database architecture
VENNILAV6
 
PPTX
Data Redundancy & Update Anomalies
Jens Patel
 
PPTX
Ooad presentatin crc cards
Hitachi Systems Micro Clinic
 
PPT
Database fragmentation
Punjab College Of Technical Education
 
PPTX
3 Level Architecture
Adeel Rasheed
 
PPT
Entity relationship modelling
Dr. C.V. Suresh Babu
 
PDF
Triggers and active database
BalaMuruganSamuthira
 
PDF
Chapter 2 Relational Data Model-part1
Eddyzulham Mahluzydde
 
PPTX
Phases of distributed query processing
Nevil Dsouza
 
2. Entity Relationship Model in DBMS
koolkampus
 
Data administration
Prof. Erwin Globio
 
Library management (use case diagram Software engineering)
kiran Patel
 
Expense tracker management system project report.pdf
Kamal Acharya
 
Relational databases
Fiddy Prasetiya
 
Introduction to Object Oriented databases
Dr. C.V. Suresh Babu
 
Relational Database Design
Archit Saxena
 
300+ top database management system questions and answers 2020
tadeseguchi
 
Data model and entity relationship
Knowledge Center Computer
 
Software requirements specification of Library Management System
Soumili Sen
 
Database architecture
VENNILAV6
 
Data Redundancy & Update Anomalies
Jens Patel
 
Ooad presentatin crc cards
Hitachi Systems Micro Clinic
 
3 Level Architecture
Adeel Rasheed
 
Entity relationship modelling
Dr. C.V. Suresh Babu
 
Triggers and active database
BalaMuruganSamuthira
 
Chapter 2 Relational Data Model-part1
Eddyzulham Mahluzydde
 
Phases of distributed query processing
Nevil Dsouza
 

Viewers also liked (20)

PPT
Lecture 04 normalization
emailharmeet
 
PPTX
Database Normalization
Ehsan Hamzei
 
PPT
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Oum Saokosal
 
PPT
Normalization of database tables
Dhani Ahmad
 
PPTX
Database Normalization
Rathan Raj
 
PPTX
Database - Normalization
Mudasir Qazi
 
PPTX
Normalization
Salman Memon
 
PDF
Database design & Normalization (1NF, 2NF, 3NF)
Jargalsaikhan Alyeksandr
 
PPT
Normalization of database_tables_chapter_4
Farhan Chishti
 
PPTX
Database normalization
Edward Blurock
 
PPTX
Normalization in DBMS
Prateek Parimal
 
PPTX
Entity relationship diagram - Concept on normalization
Satya Pal
 
PPT
DBMS - Normalization
Jitendra Tomar
 
PPT
Databases: Normalisation
Damian T. Gordon
 
PPTX
Information system in global business
Unitedworld School Of Business
 
PPTX
Database Join
Farooq Mian
 
PPT
Sub join a query optimization algorithm for flash-based database
Zhichao Liang
 
PPT
b - Normalizing a Data Model
Dimara Hakim
 
DOCX
Dbm 380 week 3 learning team ms access tables
raichanara1973
 
PPTX
Database Introduction - Join Query
Dudy Ali
 
Lecture 04 normalization
emailharmeet
 
Database Normalization
Ehsan Hamzei
 
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Oum Saokosal
 
Normalization of database tables
Dhani Ahmad
 
Database Normalization
Rathan Raj
 
Database - Normalization
Mudasir Qazi
 
Normalization
Salman Memon
 
Database design & Normalization (1NF, 2NF, 3NF)
Jargalsaikhan Alyeksandr
 
Normalization of database_tables_chapter_4
Farhan Chishti
 
Database normalization
Edward Blurock
 
Normalization in DBMS
Prateek Parimal
 
Entity relationship diagram - Concept on normalization
Satya Pal
 
DBMS - Normalization
Jitendra Tomar
 
Databases: Normalisation
Damian T. Gordon
 
Information system in global business
Unitedworld School Of Business
 
Database Join
Farooq Mian
 
Sub join a query optimization algorithm for flash-based database
Zhichao Liang
 
b - Normalizing a Data Model
Dimara Hakim
 
Dbm 380 week 3 learning team ms access tables
raichanara1973
 
Database Introduction - Join Query
Dudy Ali
 
Ad

Similar to Normalization in Database (20)

PPTX
week 7 normalization.pptx
ashfaqahmad757727
 
PPT
Chapter six - Normalization.ppt fundamental of db
bereketalemayehu34
 
PPT
Normalization.ppt What is Normalizations
SHAKIR325211
 
PPTX
Chapter Four Logical Database Design (Normalization).pptx
haymanot taddesse
 
PPTX
DBMS_UNIT_IV.pptxbdndjdkdjdndjkdkdkdkdkdkdk
KGowtham16
 
PDF
24042020_normalization 1.pdf
Shivani139202
 
PPT
MODULE 3 -Normalization_1.ppt moduled in design
HemaSenthil5
 
PPTX
Week9_Theory.pptx
MDTOUKERAHMED
 
PPTX
Normalization in Database Management System
marysj3
 
PDF
Chapter – 4 Normalization and Relational Algebra.pdf
TamiratDejene1
 
PPTX
DBMS (UNIT 2)
Dr. SURBHI SAROHA
 
PPTX
L1-Normalization 1NF 2NF 3NF 4NF BCNF.pptx
ChandrashekharSingh859453
 
PPTX
6. normalization
khoahuy82
 
PDF
Ch06-Normalization SDHVFDDGNMFBVMBNCVMNMV
barsubiasarah
 
PPT
MODULE 3 -Normalization bwdhwbifnweipfnewknfqekndd_1.ppt
HemaSenthil5
 
PPTX
database ds...normalization data base
wwcd090
 
PPTX
database ds...normalization in data base
wwcd090
 
PPTX
normalization In data base lecture no sixth
wwcd090
 
PDF
Normalization in Database
A. S. M. Shafi
 
PPT
Normalization_BCA_
Bhavini Shah
 
week 7 normalization.pptx
ashfaqahmad757727
 
Chapter six - Normalization.ppt fundamental of db
bereketalemayehu34
 
Normalization.ppt What is Normalizations
SHAKIR325211
 
Chapter Four Logical Database Design (Normalization).pptx
haymanot taddesse
 
DBMS_UNIT_IV.pptxbdndjdkdjdndjkdkdkdkdkdkdk
KGowtham16
 
24042020_normalization 1.pdf
Shivani139202
 
MODULE 3 -Normalization_1.ppt moduled in design
HemaSenthil5
 
Week9_Theory.pptx
MDTOUKERAHMED
 
Normalization in Database Management System
marysj3
 
Chapter – 4 Normalization and Relational Algebra.pdf
TamiratDejene1
 
DBMS (UNIT 2)
Dr. SURBHI SAROHA
 
L1-Normalization 1NF 2NF 3NF 4NF BCNF.pptx
ChandrashekharSingh859453
 
6. normalization
khoahuy82
 
Ch06-Normalization SDHVFDDGNMFBVMBNCVMNMV
barsubiasarah
 
MODULE 3 -Normalization bwdhwbifnweipfnewknfqekndd_1.ppt
HemaSenthil5
 
database ds...normalization data base
wwcd090
 
database ds...normalization in data base
wwcd090
 
normalization In data base lecture no sixth
wwcd090
 
Normalization in Database
A. S. M. Shafi
 
Normalization_BCA_
Bhavini Shah
 
Ad

More from Afrasiyab Haider (20)

PPTX
How to know value of a company
Afrasiyab Haider
 
PPTX
Providing feedback for effective listening
Afrasiyab Haider
 
PPTX
Rectification of errors (Financial Accounting)
Afrasiyab Haider
 
DOCX
Octal to binary and octal to hexa decimal conversions
Afrasiyab Haider
 
PPTX
RUP - Rational Unified Process
Afrasiyab Haider
 
PPT
Facts finding techniques in Database
Afrasiyab Haider
 
DOCX
File organization in database
Afrasiyab Haider
 
DOCX
Software development life cycle
Afrasiyab Haider
 
DOCX
Expected value of random variables
Afrasiyab Haider
 
DOCX
Class diagram of school management system (OOP)
Afrasiyab Haider
 
DOCX
What is difference between dbms and rdbms
Afrasiyab Haider
 
DOCX
Database development life cycle
Afrasiyab Haider
 
DOCX
Relation of psychology and IT
Afrasiyab Haider
 
DOCX
What is Psychology and variables in psychology?
Afrasiyab Haider
 
PPTX
History of operating systems
Afrasiyab Haider
 
DOCX
Expected value of random variables
Afrasiyab Haider
 
DOCX
File organization in database
Afrasiyab Haider
 
PPTX
Should prisoners be allowed to cast vote?
Afrasiyab Haider
 
PPTX
Politics and martial law in pakistan
Afrasiyab Haider
 
PPTX
Html and its tags
Afrasiyab Haider
 
How to know value of a company
Afrasiyab Haider
 
Providing feedback for effective listening
Afrasiyab Haider
 
Rectification of errors (Financial Accounting)
Afrasiyab Haider
 
Octal to binary and octal to hexa decimal conversions
Afrasiyab Haider
 
RUP - Rational Unified Process
Afrasiyab Haider
 
Facts finding techniques in Database
Afrasiyab Haider
 
File organization in database
Afrasiyab Haider
 
Software development life cycle
Afrasiyab Haider
 
Expected value of random variables
Afrasiyab Haider
 
Class diagram of school management system (OOP)
Afrasiyab Haider
 
What is difference between dbms and rdbms
Afrasiyab Haider
 
Database development life cycle
Afrasiyab Haider
 
Relation of psychology and IT
Afrasiyab Haider
 
What is Psychology and variables in psychology?
Afrasiyab Haider
 
History of operating systems
Afrasiyab Haider
 
Expected value of random variables
Afrasiyab Haider
 
File organization in database
Afrasiyab Haider
 
Should prisoners be allowed to cast vote?
Afrasiyab Haider
 
Politics and martial law in pakistan
Afrasiyab Haider
 
Html and its tags
Afrasiyab Haider
 

Recently uploaded (20)

PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PPTX
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
PDF
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
July Patch Tuesday
Ivanti
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 

Normalization in Database

  • 1. NORMALIZATION Instructor: Mehwashma Amir E-R Model and Normalization/ Session 2 1
  • 2. SQL Server 2012 © Aptech Ltd. SQL Server 2012 2E-R Model and Normalization/ Session 2  Initially, all databases are characterized by large number of columns and records.  This approach has certain drawbacks.  The following table consist of details of the employees and the project they are working on. Repetition Anomaly  The data such as Project_id, Project_name, Grade, and Salary repeat many times.  This repetition hampers both, performance during retrieval of data and the storage capacity.  This repetition of data is called the repetition anomaly.
  • 3. SQL Server 2012 © Aptech Ltd. SQL Server 2012 3E-R Model and Normalization/ Session 2  The repetition is shown in the following table with the help of shaded cells: Insertion Anomaly  Suppose the department recruits a new employee named Ann.  Consider that Ann has not been assigned any project. Insertion of her details in the table would leave columns Project_id and Project_name empty.  Leaving columns blank could lead to problems later.  Anomalies created by such insertions are called insertion anomalies as shown in the following table:
  • 4. SQL Server 2012 © Aptech Ltd. SQL Server 2012 4E-R Model and Normalization/ Session 2 Deletion Anomaly  Suppose, Bob is relieved from the project MAGNUM.  Deleting the record deletes Bob's Emp_no, Grade, and Salary details too.  This loss of data is harmful as all of Bob's personal details are also lost.  This kind of loss of data due to deletion is called deletion anomaly as can be seen in the following table: Updating Anomaly  Suppose John was given a hike in Salary or John was demoted.  The change in John's Salary or Grade needs to be reflected in all projects John works for.  This problem in updating all the occurrences is called updating anomaly.
  • 5. SQL Server 2012 © Aptech Ltd. SQL Server 2012 5E-R Model and Normalization/ Session 2 The Department Employee Details table is called an unnormalized table. These drawbacks lead to the need for normalization. Normalization is the process of removing unwanted redundancy and dependencies. Initially, Codd (1972) presented three normal forms (1NF, 2NF, and 3NF), all based on dependencies among the attributes of a relation. The fourth and fifth normal forms are based on multi value and join dependencies and were proposed later.
  • 6. SQL Server 2012 © Aptech Ltd. SQL Server 2012 6E-R Model and Normalization/ Session 2 1 • Create separate tables for each group of related data. 2 • The table columns must have atomic values. 3 • All the key attributes must be identified.  In order to achieve the first normal form, following steps need to be performed:  Consider the Employee Project Details table as follows:  The table has data related to projects and employees.  The table needs to be split into two tables, that is, a Project Details table and an Employee Details table.  The table columns, Project_id and Project_names, have multiple values.
  • 7. SQL Server 2012 © Aptech Ltd. SQL Server 2012 7E-R Model and Normalization/ Session 2  The data needs to be split over different rows.  The resultant tables are Project Details and Employee Details as follows: Project Details Employee Details  The Project_id attribute is the primary key for the Project Details table.  The Emp_no attribute is the primary key for the Employee Details table.  Therefore, in first normal form, the initial Employee Project Details table has been reduced to the Project Details and Employee Details tables.
  • 8. SQL Server 2012 © Aptech Ltd. SQL Server 2012 8E-R Model and Normalization/ Session 2  The tables are said to be in second normal form if:  Partial dependency means a non-key attribute should not be partially dependent on more than one key attribute.  The Project Details and Employee Details tables do not exhibit any partial dependencies.  The Project_name is dependent only on Project_id and Emp_name, Grade, and Salary are dependant only on Emp_no.  The tables also need to be related through foreign keys.  A third table, named Employee Project Details, is created with only two columns, Project_id and Emp_no. They meet the requirements of the first normal form. There are no partial dependencies in the tables. The tables are related through foreign keys.
  • 9. SQL Server 2012 © Aptech Ltd. SQL Server 2012 9E-R Model and Normalization/ Session 2  So, the project and employee details tables on conversion to second normal form generates tables Project Details, Employee Details, and Employee Project Details as follows: Project Details Employee Project Details Employee Details  The attributes, Emp_no and Project_id, of the Employee Project Details table combine together to form the primary key.  Such primary keys are called composite primary keys.
  • 10. SQL Server 2012 © Aptech Ltd. SQL Server 2012 10E-R Model and Normalization/ Session 2  To achieve the third normal form: The tables should meet the requirements of the second normal form The tables should not have transitive dependencies in them  The Project Details, Employee Details, and Employee Project Details tables are in second normal form.  If an attribute can be determined by another non-key attribute, it is called a transitive dependency.  That is, every non-key attribute should be determined by the key attribute only.  If a non-key attribute can be determined by another non-key attribute, it needs to put into another table.
  • 11. SQL Server 2012 © Aptech Ltd. SQL Server 2012 11E-R Model and Normalization/ Session 2  On observing the different tables, it is seen that the Project Details and Employee Project Details tables do not exhibit any such transitive dependencies.  The non-key attributes are totally determined by the key attributes.  Project_name is only determined by Project_number.  On further scrutinizing the Employee Details table, a certain inconsistency is seen.  The attribute Salary is determined by the attribute Grade and not the key attribute Emp_no.  Thus, this transitive dependency needs to be removed.  The Employee Details table can be split into Employee Details and Grade Salary Details tables as follows: Employee Details Grade Salary Details
  • 12. SQL Server 2012 © Aptech Ltd. SQL Server 2012 12E-R Model and Normalization/ Session 2  Thus, at the end of the three normalization stages, the initial Employee Project Details table has been reduced to the Project Details, Employee Project Details, Employee Details, and Grade Salary Details tables as follows: Employee Details Grade Salary Details Project Details Employee Project Details
  • 13. SQL Server 2012 © Aptech Ltd. SQL Server 2012 13E-R Model and Normalization/ Session 2 By normalizing a database, redundancy is reduced. This, in turn, reduces the storage requirements for the database and ensures data integrity. However, it has following drawbacks: Complex join queries may have to be written often to combine the data in multiple tables. Joins may practically involve more than three tables depending on the need for information.  If such joins are used very often, the performance of the database will become very poor.  In such cases, storing a few fields redundantly can be ignored to increase the performance of the database.  The databases that possess such minor redundancies in order to increase performance are called denormalized databases and the process of doing so is called denormalization.