SlideShare a Scribd company logo
1 of 13
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

Extended relational algebra
Extended relational algebraExtended relational algebra
Extended relational algebra1Arun_Pandey
 
Relational Algebra-Database Systems
Relational Algebra-Database SystemsRelational Algebra-Database Systems
Relational Algebra-Database Systemsjakodongo
 
Learn Normalization in simple language
Learn Normalization in simple languageLearn Normalization in simple language
Learn Normalization in simple languageFirstWire Apps
 
Elementary data organisation
Elementary data organisationElementary data organisation
Elementary data organisationMuzamil Hussain
 
Importance of Normalization
Importance of NormalizationImportance of Normalization
Importance of NormalizationShwe Yee
 
Relational algebra-and-relational-calculus
Relational algebra-and-relational-calculusRelational algebra-and-relational-calculus
Relational algebra-and-relational-calculusSalman Vadsarya
 
Fd & Normalization - Database Management System
Fd & Normalization - Database Management SystemFd & Normalization - Database Management System
Fd & Normalization - Database Management SystemDrishti Bhalla
 
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAINFP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAINSyahriha Ruslan
 
Normalization in a Database
Normalization in a DatabaseNormalization in a Database
Normalization in a DatabaseBishrul Haq
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLEVraj Patel
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database DesignArchit Saxena
 
ER model to Relational model mapping
ER model to Relational model mappingER model to Relational model mapping
ER model to Relational model mappingShubham Saini
 
Dbms 14: Relational Calculus
Dbms 14: Relational CalculusDbms 14: Relational Calculus
Dbms 14: Relational CalculusAmiya9439793168
 

What's hot (20)

Database schema
Database schemaDatabase schema
Database schema
 
Extended relational algebra
Extended relational algebraExtended relational algebra
Extended relational algebra
 
ER MODEL
ER MODELER MODEL
ER MODEL
 
Normalization
NormalizationNormalization
Normalization
 
Relational Algebra-Database Systems
Relational Algebra-Database SystemsRelational Algebra-Database Systems
Relational Algebra-Database Systems
 
Learn Normalization in simple language
Learn Normalization in simple languageLearn Normalization in simple language
Learn Normalization in simple language
 
Elementary data organisation
Elementary data organisationElementary data organisation
Elementary data organisation
 
Data Structures (BE)
Data Structures (BE)Data Structures (BE)
Data Structures (BE)
 
Relational Calculus
Relational CalculusRelational Calculus
Relational Calculus
 
Importance of Normalization
Importance of NormalizationImportance of Normalization
Importance of Normalization
 
Relational algebra-and-relational-calculus
Relational algebra-and-relational-calculusRelational algebra-and-relational-calculus
Relational algebra-and-relational-calculus
 
Fd & Normalization - Database Management System
Fd & Normalization - Database Management SystemFd & Normalization - Database Management System
Fd & Normalization - Database Management System
 
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAINFP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAIN
 
Functional dependency
Functional dependencyFunctional dependency
Functional dependency
 
enhanced er diagram
enhanced er diagramenhanced er diagram
enhanced er diagram
 
Normalization in a Database
Normalization in a DatabaseNormalization in a Database
Normalization in a Database
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
 
ER model to Relational model mapping
ER model to Relational model mappingER model to Relational model mapping
ER model to Relational model mapping
 
Dbms 14: Relational Calculus
Dbms 14: Relational CalculusDbms 14: Relational Calculus
Dbms 14: Relational Calculus
 

Viewers also liked

Lecture 04 normalization
Lecture 04 normalization Lecture 04 normalization
Lecture 04 normalization emailharmeet
 
Database Normalization
Database NormalizationDatabase Normalization
Database NormalizationEhsan Hamzei
 
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFOum Saokosal
 
Normalization of database tables
Normalization of database tablesNormalization of database tables
Normalization of database tablesDhani Ahmad
 
Database Normalization
Database NormalizationDatabase Normalization
Database NormalizationRathan Raj
 
Database - Normalization
Database - NormalizationDatabase - Normalization
Database - NormalizationMudasir Qazi
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Jargalsaikhan Alyeksandr
 
Normalization of database_tables_chapter_4
Normalization of database_tables_chapter_4Normalization of database_tables_chapter_4
Normalization of database_tables_chapter_4Farhan Chishti
 
Database normalization
Database normalizationDatabase normalization
Database normalizationEdward Blurock
 
Sub join a query optimization algorithm for flash-based database
Sub join a query optimization algorithm for flash-based databaseSub join a query optimization algorithm for flash-based database
Sub join a query optimization algorithm for flash-based databaseZhichao Liang
 
b - Normalizing a Data Model
b - Normalizing a Data Modelb - Normalizing a Data Model
b - Normalizing a Data ModelDimara Hakim
 
Dbm 380 week 3 learning team ms access tables
Dbm 380 week 3 learning team ms access tablesDbm 380 week 3 learning team ms access tables
Dbm 380 week 3 learning team ms access tablesraichanara1973
 
Database Introduction - Join Query
Database Introduction - Join QueryDatabase Introduction - Join Query
Database Introduction - Join QueryDudy Ali
 
multi-threading
multi-threadingmulti-threading
multi-threadingEzzat Gul
 

Viewers also liked (20)

Lecture 04 normalization
Lecture 04 normalization Lecture 04 normalization
Lecture 04 normalization
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
 
Normalization of database tables
Normalization of database tablesNormalization of database tables
Normalization of database tables
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
Database - Normalization
Database - NormalizationDatabase - Normalization
Database - Normalization
 
Normalization
NormalizationNormalization
Normalization
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)
 
Normalization of database_tables_chapter_4
Normalization of database_tables_chapter_4Normalization of database_tables_chapter_4
Normalization of database_tables_chapter_4
 
Database normalization
Database normalizationDatabase normalization
Database normalization
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
DBMS - Normalization
DBMS - NormalizationDBMS - Normalization
DBMS - Normalization
 
Databases: Normalisation
Databases: NormalisationDatabases: Normalisation
Databases: Normalisation
 
Information system in global business
Information system in global business  Information system in global business
Information system in global business
 
Database Join
Database JoinDatabase Join
Database Join
 
Sub join a query optimization algorithm for flash-based database
Sub join a query optimization algorithm for flash-based databaseSub join a query optimization algorithm for flash-based database
Sub join a query optimization algorithm for flash-based database
 
b - Normalizing a Data Model
b - Normalizing a Data Modelb - Normalizing a Data Model
b - Normalizing a Data Model
 
Dbm 380 week 3 learning team ms access tables
Dbm 380 week 3 learning team ms access tablesDbm 380 week 3 learning team ms access tables
Dbm 380 week 3 learning team ms access tables
 
Database Introduction - Join Query
Database Introduction - Join QueryDatabase Introduction - Join Query
Database Introduction - Join Query
 
multi-threading
multi-threadingmulti-threading
multi-threading
 

Similar to Normalization in Database

Handling errors in t sql code (1)
Handling errors in t sql code (1)Handling errors in t sql code (1)
Handling errors in t sql code (1)Ris Fernandez
 
Designing Database Solutions for Microsoft SQL Server 2012 2012 Microsoft 70-...
Designing Database Solutions for Microsoft SQL Server 2012 2012 Microsoft 70-...Designing Database Solutions for Microsoft SQL Server 2012 2012 Microsoft 70-...
Designing Database Solutions for Microsoft SQL Server 2012 2012 Microsoft 70-...ChristopherBow2
 
Database Modeling presentation
Database Modeling  presentationDatabase Modeling  presentation
Database Modeling presentationBhavishya Tyagi
 
Migrate Microsoft Access to SQL Server
Migrate Microsoft Access to SQL ServerMigrate Microsoft Access to SQL Server
Migrate Microsoft Access to SQL ServerADNUG
 
Introduction to sql server
Introduction to sql serverIntroduction to sql server
Introduction to sql serverVinay Thota
 
Arrays and lists in sql server 2008
Arrays and lists in sql server 2008Arrays and lists in sql server 2008
Arrays and lists in sql server 2008nxthuong
 
Chapter – 3 Database Design P-II.pdf
Chapter – 3 Database Design P-II.pdfChapter – 3 Database Design P-II.pdf
Chapter – 3 Database Design P-II.pdfTamiratDejene1
 
1. What two conditions must be met before an entity can be classif.docx
1. What two conditions must be met before an entity can be classif.docx1. What two conditions must be met before an entity can be classif.docx
1. What two conditions must be met before an entity can be classif.docxjackiewalcutt
 
Module 4_PART1.pptx
Module 4_PART1.pptxModule 4_PART1.pptx
Module 4_PART1.pptxHaso12
 
Vaastav talwar a010145020052 adbms psda vaastav talwar
Vaastav talwar a010145020052 adbms psda   vaastav talwarVaastav talwar a010145020052 adbms psda   vaastav talwar
Vaastav talwar a010145020052 adbms psda vaastav talwarShambhavi Vats
 
SQL Query Interview Questions
SQL Query Interview QuestionsSQL Query Interview Questions
SQL Query Interview Questionssoniajessica2
 
Normalization.ppt What is Normalizations
Normalization.ppt What is NormalizationsNormalization.ppt What is Normalizations
Normalization.ppt What is NormalizationsSHAKIR325211
 
ABC Architecture A New Approach To Build Reusable And Adaptable Business Tie...
ABC Architecture  A New Approach To Build Reusable And Adaptable Business Tie...ABC Architecture  A New Approach To Build Reusable And Adaptable Business Tie...
ABC Architecture A New Approach To Build Reusable And Adaptable Business Tie...Joshua Gorinson
 
Instructions sc access_1a[1]
Instructions sc access_1a[1]Instructions sc access_1a[1]
Instructions sc access_1a[1]gaaaaaaaasa
 
New features of sql server 2005
New features of sql server 2005New features of sql server 2005
New features of sql server 2005Govind Raj
 

Similar to Normalization in Database (20)

Sql Server 2000
Sql Server 2000Sql Server 2000
Sql Server 2000
 
Dba2 spec
Dba2 specDba2 spec
Dba2 spec
 
Handling errors in t sql code (1)
Handling errors in t sql code (1)Handling errors in t sql code (1)
Handling errors in t sql code (1)
 
Designing Database Solutions for Microsoft SQL Server 2012 2012 Microsoft 70-...
Designing Database Solutions for Microsoft SQL Server 2012 2012 Microsoft 70-...Designing Database Solutions for Microsoft SQL Server 2012 2012 Microsoft 70-...
Designing Database Solutions for Microsoft SQL Server 2012 2012 Microsoft 70-...
 
Database Modeling presentation
Database Modeling  presentationDatabase Modeling  presentation
Database Modeling presentation
 
Migrate Microsoft Access to SQL Server
Migrate Microsoft Access to SQL ServerMigrate Microsoft Access to SQL Server
Migrate Microsoft Access to SQL Server
 
Introduction to sql server
Introduction to sql serverIntroduction to sql server
Introduction to sql server
 
Arrays and lists in sql server 2008
Arrays and lists in sql server 2008Arrays and lists in sql server 2008
Arrays and lists in sql server 2008
 
Chapter – 3 Database Design P-II.pdf
Chapter – 3 Database Design P-II.pdfChapter – 3 Database Design P-II.pdf
Chapter – 3 Database Design P-II.pdf
 
Merging data (1)
Merging data (1)Merging data (1)
Merging data (1)
 
A
AA
A
 
1. What two conditions must be met before an entity can be classif.docx
1. What two conditions must be met before an entity can be classif.docx1. What two conditions must be met before an entity can be classif.docx
1. What two conditions must be met before an entity can be classif.docx
 
Module 4_PART1.pptx
Module 4_PART1.pptxModule 4_PART1.pptx
Module 4_PART1.pptx
 
Vaastav talwar a010145020052 adbms psda vaastav talwar
Vaastav talwar a010145020052 adbms psda   vaastav talwarVaastav talwar a010145020052 adbms psda   vaastav talwar
Vaastav talwar a010145020052 adbms psda vaastav talwar
 
SQL Query Interview Questions
SQL Query Interview QuestionsSQL Query Interview Questions
SQL Query Interview Questions
 
Normalization.ppt What is Normalizations
Normalization.ppt What is NormalizationsNormalization.ppt What is Normalizations
Normalization.ppt What is Normalizations
 
uniT 4 (1).pptx
uniT 4 (1).pptxuniT 4 (1).pptx
uniT 4 (1).pptx
 
ABC Architecture A New Approach To Build Reusable And Adaptable Business Tie...
ABC Architecture  A New Approach To Build Reusable And Adaptable Business Tie...ABC Architecture  A New Approach To Build Reusable And Adaptable Business Tie...
ABC Architecture A New Approach To Build Reusable And Adaptable Business Tie...
 
Instructions sc access_1a[1]
Instructions sc access_1a[1]Instructions sc access_1a[1]
Instructions sc access_1a[1]
 
New features of sql server 2005
New features of sql server 2005New features of sql server 2005
New features of sql server 2005
 

More from Afrasiyab Haider

How to know value of a company
How to know value of a companyHow to know value of a company
How to know value of a companyAfrasiyab Haider
 
Providing feedback for effective listening
Providing feedback for effective listeningProviding feedback for effective listening
Providing feedback for effective listeningAfrasiyab Haider
 
Rectification of errors (Financial Accounting)
Rectification of errors (Financial Accounting)Rectification of errors (Financial Accounting)
Rectification of errors (Financial Accounting)Afrasiyab Haider
 
Octal to binary and octal to hexa decimal conversions
Octal to binary and octal to hexa decimal conversionsOctal to binary and octal to hexa decimal conversions
Octal to binary and octal to hexa decimal conversionsAfrasiyab Haider
 
RUP - Rational Unified Process
RUP - Rational Unified ProcessRUP - Rational Unified Process
RUP - Rational Unified ProcessAfrasiyab Haider
 
Facts finding techniques in Database
Facts finding techniques in Database Facts finding techniques in Database
Facts finding techniques in Database Afrasiyab Haider
 
File organization in database
File organization in databaseFile organization in database
File organization in databaseAfrasiyab Haider
 
Software development life cycle
Software development life cycleSoftware development life cycle
Software development life cycleAfrasiyab Haider
 
Expected value of random variables
Expected value of random variablesExpected value of random variables
Expected value of random variablesAfrasiyab Haider
 
Class diagram of school management system (OOP)
Class diagram of school management system (OOP)Class diagram of school management system (OOP)
Class diagram of school management system (OOP)Afrasiyab Haider
 
What is difference between dbms and rdbms
What is difference between dbms and rdbmsWhat is difference between dbms and rdbms
What is difference between dbms and rdbmsAfrasiyab Haider
 
Database development life cycle
Database development life cycleDatabase development life cycle
Database development life cycleAfrasiyab Haider
 
Relation of psychology and IT
Relation of psychology and ITRelation of psychology and IT
Relation of psychology and ITAfrasiyab Haider
 
What is Psychology and variables in psychology?
What is Psychology and variables in psychology?What is Psychology and variables in psychology?
What is Psychology and variables in psychology?Afrasiyab Haider
 
History of operating systems
History of operating systemsHistory of operating systems
History of operating systemsAfrasiyab Haider
 
Expected value of random variables
Expected value of random variablesExpected value of random variables
Expected value of random variablesAfrasiyab Haider
 
File organization in database
File organization in databaseFile organization in database
File organization in databaseAfrasiyab Haider
 
Should prisoners be allowed to cast vote?
Should prisoners be allowed to cast vote?Should prisoners be allowed to cast vote?
Should prisoners be allowed to cast vote?Afrasiyab Haider
 
Politics and martial law in pakistan
Politics and martial law in pakistanPolitics and martial law in pakistan
Politics and martial law in pakistanAfrasiyab Haider
 

More from Afrasiyab Haider (20)

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

Recently uploaded

Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform EngineeringMarcus Vechiato
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024Lorenzo Miniero
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!Memoori
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)Samir Dash
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingScyllaDB
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxFIDO Alliance
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctBrainSell Technologies
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe中 央社
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentationyogeshlabana357357
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityVictorSzoltysek
 
CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)Wonjun Hwang
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...ScyllaDB
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 
Navigating the Large Language Model choices_Ravi Daparthi
Navigating the Large Language Model choices_Ravi DaparthiNavigating the Large Language Model choices_Ravi Daparthi
Navigating the Large Language Model choices_Ravi DaparthiRaviKumarDaparthi
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Skynet Technologies
 
الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهMohamed Sweelam
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...panagenda
 
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...SOFTTECHHUB
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxjbellis
 

Recently uploaded (20)

Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Navigating the Large Language Model choices_Ravi Daparthi
Navigating the Large Language Model choices_Ravi DaparthiNavigating the Large Language Model choices_Ravi Daparthi
Navigating the Large Language Model choices_Ravi Daparthi
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 
الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهله
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 

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.