SlideShare ist ein Scribd-Unternehmen logo
1 von 15
Downloaden Sie, um offline zu lesen
LECTURE # 6
Normalization
1
Data Warehousing
Normalization
2
Normalization is the process of efficiently
organizing data in a database by decomposing
(splitting) a relational table into smaller tables.
Normalization
3
What are the goals of normalization?
 Eliminate redundant data. (for example, storing the same data in
more than one table)
 Ensure data dependencies make sense (only storing
related data in a table)
Normalization
4
What is the result of normalization?
What are the levels of normalization?
Normalization
SID Degree Campus Course Marks
1 BS Islamabad CS-101 30
1 BS Islamabad CS-102 20
1 BS Islamabad CS-103 40
1 BS Islamabad CS-104 20
1 BS Islamabad CS-105 10
1 BS Islamabad CS-106 10
2 MS Lahore CS-101 30
2 MS Lahore CS-102 40
3 MS Lahore CS-102 20
4 BS Islamabad CS-102 20
4 BS Islamabad CS-104 30
4 BS Islamabad CS-105 40
5
SID: Student ID
Degree: Registered as BS or MS student
Campus: City where campus is located
Course: Course taken
Marks: Score out of max of 50
Consider a student database system to be developed for a multi-campus university, such
that it specializes in one degree program at a campus i.e. BS, MS or PhD.
Normalization: 1NF
6
Only contains atomic values, BUT also contains redundant data.
40CS-105IslamabadBS4
30CS-104IslamabadBS4
20CS-102IslamabadBS4
20CS-102LahoreMS3
40CS-102LahoreMS2
30CS-101LahoreMS2
10CS-106IslamabadBS1
10CS-105IslamabadBS1
20CS-104IslamabadBS1
40CS-103IslamabadBS1
20CS-102IslamabadBS1
30CS-101IslamabadBS1
MarksCourseCampusDegreeSID
FIRST
Normalization: 1NF
7
Update anomalies
INSERT. Certain student with SID 5 got admission in a
different campus (say) Karachi cannot be added until the
student registers for a course.
DELETE. If student graduates and his/her corresponding
record is deleted, then all information about that student
is lost.
UPDATE. If student migrates from Islamabad campus to
Lahore campus (say) SID = 1, then six rows would have
to be updated with this new information.
Normalization: 2NF
8
Every non-key column is fully dependent on the PK
FIRST is in 1NF but not in 2NF because degree and campus are
functionally dependent upon only on the column SID of the composite
key (SID, course). This can be illustrated by listing the functional
dependencies in the table:
SID —> campus, degree
campus —> degree
(SID, Course) —> Marks
To transform the table FIRST into 2NF we move the columns SID, Degree and
Campus to a new table called REGISTRATION.
The column SID becomes the primary key of this new table.
Normalization: 2NF
SID Course Marks
1 CS-101 30
1 CS-102 20
1 CS-103 40
1 CS-104 20
1 CS-105 10
1 CS-106 10
2 CS-101 30
2 CS-102 40
3 CS-102 20
4 CS-102 20
4 CS-104 30
4 CS-105 40
SID Degree Campus
1 BS Islamabad
2 MS Lahore
3 MS Lahore
4 BS Islamabad
5 PhD Peshawar
9
REGISTRATION
PERFORMANCE
SID is now a PK
PERFORMANCE in 2NF as (SID, Course) uniquely identify Marks
Normalization: 2NF
10
Presence of modification anomalies for tables in
2NF. For the table REGISTRATION, they are:
 INSERT: Until a student gets registered in a degree
program, that program cannot be offered!
 DELETE: Deleting any row from REGISTRATION destroys
all other facts in the table.
Why there are anomalies?
The table is in 2NF but NOT in 3NF
Normalization: 3NF
11
All columns must be dependent only on the primary key.
Table PERFORMANCE is already in 3NF. The non-key column, marks, is fully
dependent upon the primary key (SID, course).
REGISTRATION is in 2NF but not in 3NF because it contains a transitive
dependency.
A transitive dependency occurs when a non-key column that is a
determinant of the primary key is the determinate of other columns.
The concept of a transitive dependency can be illustrated by showing the
functional dependencies in REGISTRATION:
REGISTRATION.SID —> REGISTRATION.Degree
REGISTRATION.SID —> REGISTRATION.Campus
REGISTRATION.Campus —> REGISTRATION.Degree
Note that REGISTRATION.Degree is determined both by the primary key SID
and the non-key column campus.
Normalization: 3NF
12
To transform REGISTRATION into 3NF, we create a
new table called CAMPUS_DEGREE and move the
columns campus and degree into it.
Degree is deleted from the original table, campus is
left behind to serve as a foreign key to
CAMPUS_DEGREE, and the original table is
renamed to STUDENT_CAMPUS to reflect its
semantic meaning.
Normalization: 3NF
13
PeshawarPhD5
IslamabadBS4
LahoreMS3
LahoreMS2
IslamabadBS1
CampusDegreeSID
REGISTRATION
Peshawar5
Islamabad4
Lahore3
Lahore2
Islamabad1
CampusSID
STUDENT_CAMPUS
PhDPeshawar
MSLahore
BSIslamabad
DegreeCampus
CAMPUS_DEGREE
Normalization: 3NF
14
Removal of anomalies and improvement in
queries as follows:
 INSERT: Able to first offer a degree program,
and then students registering in it.
 UPDATE: Migrating students between
campuses by changing a single row.
 DELETE: Deleting information about a course,
without deleting facts about all columns in the
record.
Normalization
15
Conclusions:
 Normalization guidelines are cumulative.
 Generally a good idea to only ensure 2NF.
 3NF is at the cost of simplicity and performance.
 There is a 4NF with no multi-valued
dependencies.
 There is also a 5NF.

Weitere ähnliche Inhalte

Was ist angesagt?

SQL Joins and Query Optimization
SQL Joins and Query OptimizationSQL Joins and Query Optimization
SQL Joins and Query OptimizationBrian Gallagher
 
How should I monitor my idaa
How should I monitor my idaaHow should I monitor my idaa
How should I monitor my idaaCuneyt Goksu
 
Dimensional Modeling
Dimensional ModelingDimensional Modeling
Dimensional ModelingSunita Sahu
 
IBM DB2 LUW UDB DBA Online Training by Etraining.guru
IBM DB2 LUW UDB DBA Online Training by Etraining.guruIBM DB2 LUW UDB DBA Online Training by Etraining.guru
IBM DB2 LUW UDB DBA Online Training by Etraining.guruRavikumar Nandigam
 
Getting Started with MySQL I
Getting Started with MySQL IGetting Started with MySQL I
Getting Started with MySQL ISankhya_Analytics
 
Query optimization in SQL
Query optimization in SQLQuery optimization in SQL
Query optimization in SQLAbdul Rehman
 
Business Intelligence Data Warehouse System
Business Intelligence Data Warehouse SystemBusiness Intelligence Data Warehouse System
Business Intelligence Data Warehouse SystemKiran kumar
 
Chapter 03 foreign key relationships1
Chapter 03 foreign key relationships1Chapter 03 foreign key relationships1
Chapter 03 foreign key relationships1Kranthi Kumar
 
Procedures and triggers in SQL
Procedures and triggers in SQLProcedures and triggers in SQL
Procedures and triggers in SQLVikash Sharma
 
Ms sql server architecture
Ms sql server architectureMs sql server architecture
Ms sql server architectureAjeet Singh
 
ALL ABOUT DB2 DSNZPARM
ALL ABOUT DB2 DSNZPARMALL ABOUT DB2 DSNZPARM
ALL ABOUT DB2 DSNZPARMIBM
 
Reading the LISTCAT entries for VSAM
Reading the LISTCAT entries for VSAMReading the LISTCAT entries for VSAM
Reading the LISTCAT entries for VSAMDan O'Dea
 
OODM-object oriented data model
OODM-object oriented data modelOODM-object oriented data model
OODM-object oriented data modelAnilPokhrel7
 
SAP SD CONFIGURATION GUIDE
SAP SD CONFIGURATION GUIDE SAP SD CONFIGURATION GUIDE
SAP SD CONFIGURATION GUIDE Suresh Veluru
 
Basic Introduction of Data Warehousing from Adiva Consulting
Basic Introduction of  Data Warehousing from Adiva ConsultingBasic Introduction of  Data Warehousing from Adiva Consulting
Basic Introduction of Data Warehousing from Adiva Consultingadivasoft
 

Was ist angesagt? (20)

SQL Joins and Query Optimization
SQL Joins and Query OptimizationSQL Joins and Query Optimization
SQL Joins and Query Optimization
 
How should I monitor my idaa
How should I monitor my idaaHow should I monitor my idaa
How should I monitor my idaa
 
SAP ABAP data dictionary
SAP ABAP data dictionarySAP ABAP data dictionary
SAP ABAP data dictionary
 
Dimensional Modeling
Dimensional ModelingDimensional Modeling
Dimensional Modeling
 
Data Dictionary
Data DictionaryData Dictionary
Data Dictionary
 
IBM DB2 LUW UDB DBA Online Training by Etraining.guru
IBM DB2 LUW UDB DBA Online Training by Etraining.guruIBM DB2 LUW UDB DBA Online Training by Etraining.guru
IBM DB2 LUW UDB DBA Online Training by Etraining.guru
 
Getting Started with MySQL I
Getting Started with MySQL IGetting Started with MySQL I
Getting Started with MySQL I
 
Query optimization in SQL
Query optimization in SQLQuery optimization in SQL
Query optimization in SQL
 
SSIS control flow
SSIS control flowSSIS control flow
SSIS control flow
 
Business Intelligence Data Warehouse System
Business Intelligence Data Warehouse SystemBusiness Intelligence Data Warehouse System
Business Intelligence Data Warehouse System
 
Sql Server Basics
Sql Server BasicsSql Server Basics
Sql Server Basics
 
Chapter 03 foreign key relationships1
Chapter 03 foreign key relationships1Chapter 03 foreign key relationships1
Chapter 03 foreign key relationships1
 
Procedures and triggers in SQL
Procedures and triggers in SQLProcedures and triggers in SQL
Procedures and triggers in SQL
 
SKILLWISE-DB2 DBA
SKILLWISE-DB2 DBASKILLWISE-DB2 DBA
SKILLWISE-DB2 DBA
 
Ms sql server architecture
Ms sql server architectureMs sql server architecture
Ms sql server architecture
 
ALL ABOUT DB2 DSNZPARM
ALL ABOUT DB2 DSNZPARMALL ABOUT DB2 DSNZPARM
ALL ABOUT DB2 DSNZPARM
 
Reading the LISTCAT entries for VSAM
Reading the LISTCAT entries for VSAMReading the LISTCAT entries for VSAM
Reading the LISTCAT entries for VSAM
 
OODM-object oriented data model
OODM-object oriented data modelOODM-object oriented data model
OODM-object oriented data model
 
SAP SD CONFIGURATION GUIDE
SAP SD CONFIGURATION GUIDE SAP SD CONFIGURATION GUIDE
SAP SD CONFIGURATION GUIDE
 
Basic Introduction of Data Warehousing from Adiva Consulting
Basic Introduction of  Data Warehousing from Adiva ConsultingBasic Introduction of  Data Warehousing from Adiva Consulting
Basic Introduction of Data Warehousing from Adiva Consulting
 

Ähnlich wie Dwh lecture-06-normalization

Intro to Data warehousing lecture 03
Intro to Data warehousing   lecture 03Intro to Data warehousing   lecture 03
Intro to Data warehousing lecture 03AnwarrChaudary
 
PP DBMS - 2 (1) (1).pptx
PP DBMS - 2 (1) (1).pptxPP DBMS - 2 (1) (1).pptx
PP DBMS - 2 (1) (1).pptxskilljiolms
 
Normalization.pptx
Normalization.pptxNormalization.pptx
Normalization.pptxSreenivas R
 
Normmmalizzarion.ppt
Normmmalizzarion.pptNormmmalizzarion.ppt
Normmmalizzarion.pptDeependra35
 
SQL Fundamentals
SQL FundamentalsSQL Fundamentals
SQL FundamentalsBrian Foote
 
Impact of Normalization in Future
Impact of Normalization in FutureImpact of Normalization in Future
Impact of Normalization in Futureijtsrd
 
Presentation on Normalization.pptx
Presentation on Normalization.pptxPresentation on Normalization.pptx
Presentation on Normalization.pptxkshipra sony
 
Lecture 3. MS SQL. Cursors.
Lecture 3. MS SQL. Cursors.Lecture 3. MS SQL. Cursors.
Lecture 3. MS SQL. Cursors.Alexey Furmanov
 
Intro to SQL for Beginners
Intro to SQL for BeginnersIntro to SQL for Beginners
Intro to SQL for BeginnersProduct School
 
Presentations_PPT_Unit-2_25042019031227AM.pptx
Presentations_PPT_Unit-2_25042019031227AM.pptxPresentations_PPT_Unit-2_25042019031227AM.pptx
Presentations_PPT_Unit-2_25042019031227AM.pptxssuser046cf5
 
Dependencies in various topics like normalisation and its types
Dependencies in various topics like normalisation and its typesDependencies in various topics like normalisation and its types
Dependencies in various topics like normalisation and its typesnsrChowdary1
 
Normalization
NormalizationNormalization
NormalizationRamesh 4
 
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxBhupendraShahi6
 

Ähnlich wie Dwh lecture-06-normalization (20)

Lecture 6
Lecture 6Lecture 6
Lecture 6
 
Intro to Data warehousing lecture 03
Intro to Data warehousing   lecture 03Intro to Data warehousing   lecture 03
Intro to Data warehousing lecture 03
 
PP DBMS - 2 (1) (1).pptx
PP DBMS - 2 (1) (1).pptxPP DBMS - 2 (1) (1).pptx
PP DBMS - 2 (1) (1).pptx
 
Chapter 3 ( PART 2 ).pptx
Chapter 3 ( PART 2 ).pptxChapter 3 ( PART 2 ).pptx
Chapter 3 ( PART 2 ).pptx
 
Normalization.pptx
Normalization.pptxNormalization.pptx
Normalization.pptx
 
Dbms record
Dbms recordDbms record
Dbms record
 
Normmmalizzarion.ppt
Normmmalizzarion.pptNormmmalizzarion.ppt
Normmmalizzarion.ppt
 
SQL Fundamentals
SQL FundamentalsSQL Fundamentals
SQL Fundamentals
 
Sppt chap007
Sppt chap007Sppt chap007
Sppt chap007
 
Unit03 dbms
Unit03 dbmsUnit03 dbms
Unit03 dbms
 
Assignment#11
Assignment#11Assignment#11
Assignment#11
 
Impact of Normalization in Future
Impact of Normalization in FutureImpact of Normalization in Future
Impact of Normalization in Future
 
Presentation on Normalization.pptx
Presentation on Normalization.pptxPresentation on Normalization.pptx
Presentation on Normalization.pptx
 
Lecture 3. MS SQL. Cursors.
Lecture 3. MS SQL. Cursors.Lecture 3. MS SQL. Cursors.
Lecture 3. MS SQL. Cursors.
 
Intro to SQL for Beginners
Intro to SQL for BeginnersIntro to SQL for Beginners
Intro to SQL for Beginners
 
Presentations_PPT_Unit-2_25042019031227AM.pptx
Presentations_PPT_Unit-2_25042019031227AM.pptxPresentations_PPT_Unit-2_25042019031227AM.pptx
Presentations_PPT_Unit-2_25042019031227AM.pptx
 
Dependencies in various topics like normalisation and its types
Dependencies in various topics like normalisation and its typesDependencies in various topics like normalisation and its types
Dependencies in various topics like normalisation and its types
 
Normalization
NormalizationNormalization
Normalization
 
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
 
Unit03 dbms
Unit03 dbmsUnit03 dbms
Unit03 dbms
 

Mehr von Sulman Ahmed

Entrepreneurial Strategy Generating and Exploiting new entries
Entrepreneurial Strategy Generating and Exploiting new entriesEntrepreneurial Strategy Generating and Exploiting new entries
Entrepreneurial Strategy Generating and Exploiting new entriesSulman Ahmed
 
Entrepreneurial Intentions and corporate entrepreneurship
Entrepreneurial Intentions and corporate entrepreneurshipEntrepreneurial Intentions and corporate entrepreneurship
Entrepreneurial Intentions and corporate entrepreneurshipSulman Ahmed
 
Entrepreneurship main concepts and description
Entrepreneurship main concepts and descriptionEntrepreneurship main concepts and description
Entrepreneurship main concepts and descriptionSulman Ahmed
 
Run time Verification using formal methods
Run time Verification using formal methodsRun time Verification using formal methods
Run time Verification using formal methodsSulman Ahmed
 
Use of Formal Methods at Amazon Web Services
Use of Formal Methods at Amazon Web ServicesUse of Formal Methods at Amazon Web Services
Use of Formal Methods at Amazon Web ServicesSulman Ahmed
 
student learning App
student learning Appstudent learning App
student learning AppSulman Ahmed
 
Software Engineering Economics Life Cycle.
Software Engineering Economics  Life Cycle.Software Engineering Economics  Life Cycle.
Software Engineering Economics Life Cycle.Sulman Ahmed
 
Data mining Techniques
Data mining TechniquesData mining Techniques
Data mining TechniquesSulman Ahmed
 
Rules of data mining
Rules of data miningRules of data mining
Rules of data miningSulman Ahmed
 
Rules of data mining
Rules of data miningRules of data mining
Rules of data miningSulman Ahmed
 
Classification in data mining
Classification in data mining Classification in data mining
Classification in data mining Sulman Ahmed
 
Data mining Basics and complete description
Data mining Basics and complete description Data mining Basics and complete description
Data mining Basics and complete description Sulman Ahmed
 
Data mining Basics and complete description onword
Data mining Basics and complete description onwordData mining Basics and complete description onword
Data mining Basics and complete description onwordSulman Ahmed
 
Dwh lecture 13-process dm
Dwh  lecture 13-process dmDwh  lecture 13-process dm
Dwh lecture 13-process dmSulman Ahmed
 
Dwh lecture 11-molap
Dwh  lecture 11-molapDwh  lecture 11-molap
Dwh lecture 11-molapSulman Ahmed
 
Dwh lecture 10-olap
Dwh   lecture 10-olapDwh   lecture 10-olap
Dwh lecture 10-olapSulman Ahmed
 
Dwh lecture 08-denormalization tech
Dwh   lecture 08-denormalization techDwh   lecture 08-denormalization tech
Dwh lecture 08-denormalization techSulman Ahmed
 
Dwh lecture 07-denormalization
Dwh   lecture 07-denormalizationDwh   lecture 07-denormalization
Dwh lecture 07-denormalizationSulman Ahmed
 

Mehr von Sulman Ahmed (20)

Entrepreneurial Strategy Generating and Exploiting new entries
Entrepreneurial Strategy Generating and Exploiting new entriesEntrepreneurial Strategy Generating and Exploiting new entries
Entrepreneurial Strategy Generating and Exploiting new entries
 
Entrepreneurial Intentions and corporate entrepreneurship
Entrepreneurial Intentions and corporate entrepreneurshipEntrepreneurial Intentions and corporate entrepreneurship
Entrepreneurial Intentions and corporate entrepreneurship
 
Entrepreneurship main concepts and description
Entrepreneurship main concepts and descriptionEntrepreneurship main concepts and description
Entrepreneurship main concepts and description
 
Run time Verification using formal methods
Run time Verification using formal methodsRun time Verification using formal methods
Run time Verification using formal methods
 
Use of Formal Methods at Amazon Web Services
Use of Formal Methods at Amazon Web ServicesUse of Formal Methods at Amazon Web Services
Use of Formal Methods at Amazon Web Services
 
student learning App
student learning Appstudent learning App
student learning App
 
Software Engineering Economics Life Cycle.
Software Engineering Economics  Life Cycle.Software Engineering Economics  Life Cycle.
Software Engineering Economics Life Cycle.
 
Data mining Techniques
Data mining TechniquesData mining Techniques
Data mining Techniques
 
Rules of data mining
Rules of data miningRules of data mining
Rules of data mining
 
Rules of data mining
Rules of data miningRules of data mining
Rules of data mining
 
Classification in data mining
Classification in data mining Classification in data mining
Classification in data mining
 
Data mining Basics and complete description
Data mining Basics and complete description Data mining Basics and complete description
Data mining Basics and complete description
 
Data mining Basics and complete description onword
Data mining Basics and complete description onwordData mining Basics and complete description onword
Data mining Basics and complete description onword
 
Dwh lecture 12-dm
Dwh lecture 12-dmDwh lecture 12-dm
Dwh lecture 12-dm
 
Dwh lecture 13-process dm
Dwh  lecture 13-process dmDwh  lecture 13-process dm
Dwh lecture 13-process dm
 
Dwh lecture 11-molap
Dwh  lecture 11-molapDwh  lecture 11-molap
Dwh lecture 11-molap
 
Dwh lecture 10-olap
Dwh   lecture 10-olapDwh   lecture 10-olap
Dwh lecture 10-olap
 
Dwh lecture 08-denormalization tech
Dwh   lecture 08-denormalization techDwh   lecture 08-denormalization tech
Dwh lecture 08-denormalization tech
 
Dwh lecture 07-denormalization
Dwh   lecture 07-denormalizationDwh   lecture 07-denormalization
Dwh lecture 07-denormalization
 
Wbs
WbsWbs
Wbs
 

Kürzlich hochgeladen

Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
Comparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptxComparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptxAvaniJani1
 
Employablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptxEmployablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptxryandux83rd
 
How to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineHow to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineCeline George
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...Nguyen Thanh Tu Collection
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxSayali Powar
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Celine George
 
ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6Vanessa Camilleri
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxDhatriParmar
 
DiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdfDiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdfChristalin Nelson
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdfMr Bounab Samir
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17Celine George
 

Kürzlich hochgeladen (20)

prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
Chi-Square Test Non Parametric Test Categorical Variable
Chi-Square Test Non Parametric Test Categorical VariableChi-Square Test Non Parametric Test Categorical Variable
Chi-Square Test Non Parametric Test Categorical Variable
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
Spearman's correlation,Formula,Advantages,
Spearman's correlation,Formula,Advantages,Spearman's correlation,Formula,Advantages,
Spearman's correlation,Formula,Advantages,
 
Comparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptxComparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptx
 
Employablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptxEmployablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptx
 
How to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineHow to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command Line
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17
 
CARNAVAL COM MAGIA E EUFORIA _
CARNAVAL COM MAGIA E EUFORIA            _CARNAVAL COM MAGIA E EUFORIA            _
CARNAVAL COM MAGIA E EUFORIA _
 
ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
 
DiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdfDiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdf
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdf
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17
 
Mattingly "AI & Prompt Design" - Introduction to Machine Learning"
Mattingly "AI & Prompt Design" - Introduction to Machine Learning"Mattingly "AI & Prompt Design" - Introduction to Machine Learning"
Mattingly "AI & Prompt Design" - Introduction to Machine Learning"
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 

Dwh lecture-06-normalization

  • 2. Normalization 2 Normalization is the process of efficiently organizing data in a database by decomposing (splitting) a relational table into smaller tables.
  • 3. Normalization 3 What are the goals of normalization?  Eliminate redundant data. (for example, storing the same data in more than one table)  Ensure data dependencies make sense (only storing related data in a table)
  • 4. Normalization 4 What is the result of normalization? What are the levels of normalization?
  • 5. Normalization SID Degree Campus Course Marks 1 BS Islamabad CS-101 30 1 BS Islamabad CS-102 20 1 BS Islamabad CS-103 40 1 BS Islamabad CS-104 20 1 BS Islamabad CS-105 10 1 BS Islamabad CS-106 10 2 MS Lahore CS-101 30 2 MS Lahore CS-102 40 3 MS Lahore CS-102 20 4 BS Islamabad CS-102 20 4 BS Islamabad CS-104 30 4 BS Islamabad CS-105 40 5 SID: Student ID Degree: Registered as BS or MS student Campus: City where campus is located Course: Course taken Marks: Score out of max of 50 Consider a student database system to be developed for a multi-campus university, such that it specializes in one degree program at a campus i.e. BS, MS or PhD.
  • 6. Normalization: 1NF 6 Only contains atomic values, BUT also contains redundant data. 40CS-105IslamabadBS4 30CS-104IslamabadBS4 20CS-102IslamabadBS4 20CS-102LahoreMS3 40CS-102LahoreMS2 30CS-101LahoreMS2 10CS-106IslamabadBS1 10CS-105IslamabadBS1 20CS-104IslamabadBS1 40CS-103IslamabadBS1 20CS-102IslamabadBS1 30CS-101IslamabadBS1 MarksCourseCampusDegreeSID FIRST
  • 7. Normalization: 1NF 7 Update anomalies INSERT. Certain student with SID 5 got admission in a different campus (say) Karachi cannot be added until the student registers for a course. DELETE. If student graduates and his/her corresponding record is deleted, then all information about that student is lost. UPDATE. If student migrates from Islamabad campus to Lahore campus (say) SID = 1, then six rows would have to be updated with this new information.
  • 8. Normalization: 2NF 8 Every non-key column is fully dependent on the PK FIRST is in 1NF but not in 2NF because degree and campus are functionally dependent upon only on the column SID of the composite key (SID, course). This can be illustrated by listing the functional dependencies in the table: SID —> campus, degree campus —> degree (SID, Course) —> Marks To transform the table FIRST into 2NF we move the columns SID, Degree and Campus to a new table called REGISTRATION. The column SID becomes the primary key of this new table.
  • 9. Normalization: 2NF SID Course Marks 1 CS-101 30 1 CS-102 20 1 CS-103 40 1 CS-104 20 1 CS-105 10 1 CS-106 10 2 CS-101 30 2 CS-102 40 3 CS-102 20 4 CS-102 20 4 CS-104 30 4 CS-105 40 SID Degree Campus 1 BS Islamabad 2 MS Lahore 3 MS Lahore 4 BS Islamabad 5 PhD Peshawar 9 REGISTRATION PERFORMANCE SID is now a PK PERFORMANCE in 2NF as (SID, Course) uniquely identify Marks
  • 10. Normalization: 2NF 10 Presence of modification anomalies for tables in 2NF. For the table REGISTRATION, they are:  INSERT: Until a student gets registered in a degree program, that program cannot be offered!  DELETE: Deleting any row from REGISTRATION destroys all other facts in the table. Why there are anomalies? The table is in 2NF but NOT in 3NF
  • 11. Normalization: 3NF 11 All columns must be dependent only on the primary key. Table PERFORMANCE is already in 3NF. The non-key column, marks, is fully dependent upon the primary key (SID, course). REGISTRATION is in 2NF but not in 3NF because it contains a transitive dependency. A transitive dependency occurs when a non-key column that is a determinant of the primary key is the determinate of other columns. The concept of a transitive dependency can be illustrated by showing the functional dependencies in REGISTRATION: REGISTRATION.SID —> REGISTRATION.Degree REGISTRATION.SID —> REGISTRATION.Campus REGISTRATION.Campus —> REGISTRATION.Degree Note that REGISTRATION.Degree is determined both by the primary key SID and the non-key column campus.
  • 12. Normalization: 3NF 12 To transform REGISTRATION into 3NF, we create a new table called CAMPUS_DEGREE and move the columns campus and degree into it. Degree is deleted from the original table, campus is left behind to serve as a foreign key to CAMPUS_DEGREE, and the original table is renamed to STUDENT_CAMPUS to reflect its semantic meaning.
  • 14. Normalization: 3NF 14 Removal of anomalies and improvement in queries as follows:  INSERT: Able to first offer a degree program, and then students registering in it.  UPDATE: Migrating students between campuses by changing a single row.  DELETE: Deleting information about a course, without deleting facts about all columns in the record.
  • 15. Normalization 15 Conclusions:  Normalization guidelines are cumulative.  Generally a good idea to only ensure 2NF.  3NF is at the cost of simplicity and performance.  There is a 4NF with no multi-valued dependencies.  There is also a 5NF.

Hinweis der Redaktion

  1. Logical grouping of data
  2. Why redundancy removed: bcz need performance so if u require update on multiple places so it takes time. Arrange dependencies Both of these are worthy goals, as they reduce the amount of space a database consumes, and ensure that data is logically stored and is in third normal form (3NF).
  3. Normal forms have accumulative effect. Normalization improves aesthetics
  4. no two Rows of data must contain repeating group of information
  5. Select campus, degree from student where sid=5 Select marks where sid=5, that’s why need courseid also. Both form composite key. A Functional dependency is a relationship between attributes. For example, if we know the value of sid, we can obtain campus, degree etc. By this, we say that campus and degree is functionally dependent on sid.