L12 de Normalization
L12 de Normalization
DeNormalization
Lecture 12
Fahad Maqbool
Department of Computer Science
University of Sargodha
Advance Database Management System – Fall 2023
Data Lists
University of Sargodha
Advance Database Management System – Fall 2023
What is DeNormalization?
• It is not chaos, more like a “controlled crash” with the aim of
performance enhancement without loss of information.
University of Sargodha
Advance Database Management System – Fall 2023
What is DeNormalization?
• Bringing “close” dispersed but related data items.
University of Sargodha
Advance Database Management System – Fall 2023
• Reducing the number of tables and hence the reliance on joins, which
consequently speeds up performance.
University of Sargodha
Advance Database Management System – Fall 2023
DeNormalization Guidelines
• Carefully do a cost-benefit analysis (frequency of use, additional
storage, join time).
University of Sargodha
Advance Database Management System – Fall 2023
University of Sargodha
Advance Database Management System – Fall 2023
3. Pre-Joining.
ColA ColB
Collapsing Tables
denormalized
ColA ColC
Reduced indexing.
University of Sargodha
Advance Database Management System – Fall 2023
Table Table_v1 Table_v2
Vertical Split
Table_h1 Table_h2
Horizontal split
University of Sargodha
Advance Database Management System – Fall 2023
Horizontal Splitting
• Breaks a table into multiple tables based upon common column
values. Example: Campus specific queries.
• GOAL
University of Sargodha
Advance Database Management System – Fall 2023
Vertical Splitting
• Infrequently accessed columns become extra “baggage” thus degrading
performance.
• Very useful for rarely accessed large text columns with large headers.
• Header size is reduced, allowing more rows per block, thus reducing I/O.
• Splitting and distributing into separate files with repeating primary key.
• For an end user, the split appears as a single table through a view.
University of Sargodha
Advance Database Management System – Fall 2023
Pre Joining
• Identify frequent joins and append the tables together in the physical
data model.
University of Sargodha
Advance Database Management System – Fall 2023
Master
normalized
1 M
Tx_ID Sale_ID Item_ID Item_Qty Sale_Rs Detail
University of Sargodha
Advance Database Management System – Fall 2023
Pre Joining
• Typical of Market basket query