0% found this document useful (0 votes)
28 views7 pages

De Normalization

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views7 pages

De Normalization

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

What is Data

Denormalization?
Denormalization is the
process of intentionally
introducing redundancy into
a database by adding or
combining tables.
It is a trade-off between
performance and data
integrity.

Read
more

Created by
Pranjal Meshram
1.

By combining related data into a single table,


denormalization can simplify query logic, making it
easier to write and maintain queries.
2.

Denormalization is primarily used to improve the


read performance of a database. It reduces the
number of joins required to retrieve data, which
can be beneficial for complex queries and large
datasets.

3.

While normalization is aimed at reducing data


redundancy and ensuring data integrity by
organizing data into separate related tables,
denormalization aims to optimize performance,
particularly in read-heavy databases.
Created by Slide
Pranjal Meshram
Techniques of
Denormalization
Adding Redundant Data: Duplicate data is
stored in multiple tables to reduce need for joins.
Combining Tables: Related tables are
combined into a single table, which can eliminate
the need for joins entirely.
Storing Computed Values: Pre-computed
values are stored in the database, which can save
computational cost of calculating them on the fly.
Using Aggregated Data: Summary tables or
aggregated data are created to provide quicker
access to commonly queried information.

Created by
Pranjal Meshram
Why do we need to
‘De’ Normalize?
While normalization has many benefits, it also has
some shortcomings, especially in certain use cases:
Performance Overhead: Normalized databases
often require complex queries with multiple joins,
which can slow down read operations.
Increased Complexity: Highly normalized
schemas can be difficult to design, understand,
and maintain. Schema changes can also be more
complicated.
Specialized Use Cases: Normalized databases are
less optimized for scenarios requiring aggregated
data or summary reports, and may not be ideal for
Online Analytical Processing (OLAP) systems.
Created by
Pranjal Meshram
Advantages of
Denormalization
Improved Query Performance: Reducing the
number of joins and pre-computing values can
significantly improve the speed of read
operations.
Simplified Data Retrieval: Queries become
less complex and easier to write and understand.
Enhanced Reporting: Denormalized data can
be more efficient for reporting and analytical
queries, where read performance is critical.

Created by
Pranjal Meshram
Disadvantages of
Denormalization
Increased Data Redundancy: Introducing
redundancy can lead to increased storage
requirements and potential data inconsistency.
Complex Updates: Maintaining data integrity
during updates becomes more complex because
changes must be propagated across multiple
redundant copies of the data.
Potential for Anomalies: Data anomalies such
as update, insert, and delete anomalies can
occur, which normalization aims to prevent.

Created by
Pranjal Meshram
Example
Consider a normalized database with two tables:
Orders and Customers.
OrderID CustomerID OrderDate TotalAmount

1 101 2023-01-10 100.00

CustomerID CustomerName CustomerEmail

101 Robert Altman [email protected]

To retrieve the customer's name for an order, you


would need to join the Orders and Customers tables.
By storing customer details directly in the Orders
table, you eliminate the need for a join, improving
read performance but introducing redundancy.
OrderID CustomerID CustomerName CustomerEmail OrderDate TotalAmount

john.doe@exa
1 101 John Doe 2023-01-10 100.00
mple.com

Created by
Pranjal Meshram

You might also like