0% found this document useful (0 votes)
11 views3 pages

SP22-BCS-086 Database Assignment 4

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

SP22-BCS-086 Database Assignment 4

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

NAME: ABU-BAKR SIDDIQUE

REGISTRATION NO: SP22-BCS-086

CLASS/SECTION: BCS/B

COURSE TITLE: DATABASE SYSTEMS

PROFESSOR’S NAME: PROFESSOR ABDUL


QAYYUM

SUBMISSION DATE: SUNDAY, DECEMBER 24,


2023
Question: What are the methods of denormalization? Discuss the examples of each method.

Answer: Denormalization is a database optimization technique that involves intentionally introducing


redundancy into a database. Here are common methods of denormalization along with examples:

1. Duplication of Data:

Method: Store redundant copies of data in multiple tables to eliminate the need for joins.

Example: In a retail database, you might duplicate customer information in both the orders and
customers table to avoid joins when querying order details.

2. Aggregation:

Method: Pre-calculate and store aggregated values to avoid the need for recalculating them during
queries.

Example: Instead of calculating the total sales amount every time, a data warehouse may store pre-
aggregated totals for faster reporting.

3. Flattening Hierarchical Structures:

Method: Convert normalized hierarchical structures into flattened structures, reducing the need for
complex joins.

Example: In an organizational chart, denormalization might involve storing employee information along
with their department details in a flat table, avoiding recursive queries.

4. Materialized Views:

Method: Create and maintain precomputed views that store the result of a query, updating them
periodically.

Example: Storing a summarized view of monthly sales by region as a materialized view rather than
recalculating it each time.

5. Caching:

Method: Cache frequently used query results to reduce the load on the database.

Example: Storing the result of a complex and frequently executed query in a cache for a certain period
to serve subsequent requests more quickly.
6. Partitioning:

Method: Divide a large table into smaller, more manageable partitions based on specific criteria.

Example: Partitioning a sales table by date, so queries for a specific time range can be faster by
accessing only relevant partitions.

Denormalization involves trade-offs, such as increased storage requirements and the potential for data
inconsistencies. Careful consideration of the specific use case and performance requirements is crucial
when deciding to denormalize a database.

You might also like