SlideShare a Scribd company logo
1 of 41
‫الرحيم‬‫الرحمن‬‫هللا‬ ‫بسم‬
By:-
1- Amna Magzoub
2- Selma Yahyia
3- Ala Eltayeb
Denormalization
Objectives:-
 Introduction
 Definition
Why and when to denormalize data
Method of denormalization
Manage denormalization data
Advantages and disadvantages of
denormalization
 References
Introduction
• Result of normalization is a design that is
structurally consistent with minimal
redundancy.
• However, sometimes a normalized database
does not provide maximum processing
efficiency.
• May be necessary to accept loss of some
benefits of a fully normalized design in favor
of performance.
Definition :-
Denormalization is a process of combine two
relation into one new relation.
 Denormalization is the process of taking a
normalized database and modifying table
structures to allow controlled redundancy for
increased database performance.
Cont..
 The argument in favor of denormalization is
basically that it makes retrievals esaier to
express and makes the perform better.
It sometimes claimed to make the database
easier to understand.
When and why to denormailize
Some issues need to be considered before
denormalization:
1- Is the system’s performance unacceptable with fully
normalized data? Meet a client and do some testing.
2- If the performance is unacceptable, will
denormalizing make it acceptable?
3- If you denormalize to clear those bottlenecks, will the
system and its data still be reliable?
Cont…
 Speed up retrievals.
 A strict performance is required.
 It is not heavily updated.
- So, denormalize only when there is a very clear
advantage to doing.
Balancing denormalization issues
Method of denormalization:-
1) Adding Redundant Columns.
2) Adding Derived Columns
3) Combining Tables
4) Repeating Groups
5) Creating extract tables
6) Partitioning Relations
Adding Redundant Columns
• You can add redundant columns to eliminate
frequent joins. For example, if frequent joins
are performed on the titleauthor and authors
tables in order to retrieve the author's last
name, you can add the au_lname column to
titleauthor.
• Adding redundant columns eliminates joins for
many queries. The problems with this solution
are that it:
• Requires maintenance of new column. All
changes must be made to two tables, and
possibly to many rows in one of the tables.
• Requires more disk space, since au_lname is
duplicated.
Adding Derived Columns
• Adding derived columns can help eliminate
joins and reduce the time needed to produce
aggregate values.
• The example shows both benefits. Frequent
joins are needed between the titleauthor and
titles tables to provide the total advance for a
particular book title.
• You can create and maintain a derived data
column in the titles table, eliminating both the
join and the aggregate at run time. This
increases storage needs, and requires
maintenance of the derived column whenever
changes are made to the titles table.
Combining Tables
• If most users need to see the full set of joined data
from two tables, collapsing the two tables into one
can improve performance by eliminating the join.
• For example, users frequently need to see the
author name, author ID, and the blurbs copy data
at the same time. The solution is to collapse the
two tables into one. The data from the two tables
must be in a one-to-one relationship to collapse
tables.
More examples:-
Repeating Groups
These repeating groups can be stored as a nested
table within the original table.
example
Creating extract tables
• Reports can access derived data and perform
multi-relation joins on same set of base
relations. However, data the report is based on
may be relatively static or may not have to be
current.
• Possible to create a single, highly
denormalized extract table based on relations
required by reports, and allow users to access
extract table directly instead of base relations.
Partitioning Relations
• Rather than combining relations together,
alternative approach is to decompose them into
a number of smaller and more manageable
partitions.
• Two main types of partitioning:-
horizontal and vertical.
Horizontal :-
Distributing the tuples of relation across a
number of (smaller) partitioning relation.
Vertical :-
Distributing the attributes of a relation a cross a
number of (smaller) partitioning relation(the
primary key duplicated to allow the original
relation to be reconstucted.
Horizanteial:-
•Separate data into partitions so that queries
do not need to examine all data in a table
when WHERE clause filters specify only a
subset of the partitions.
•Horizontal splitting can also be more secure
since file level of security can be used to
prohibit users from seeing certain rows of
data
The example shows how the authors table might
be split to separate active and inactive authors:
Vertical Splitting:
• Vertical splitting can be used when some
columns are rarely accessed rather than other
columns
The example shows how the authors table
can be partitioned.
Vertical Examples
Managing Denormalized Data
Whatever denormalization techniques you use,
you need to develop management techniques
to ensure data integrity. Choices include:
• Triggers, which can update derived or
duplicated data anytime the base data changes.
• Application logic, using transactions in each
application that updates denormalized data to be
sure that changes are atomic.
Cont…
• Batch reconciliation, run at appropriate
intervals to bring the denormalized data back
into agreement.
• If 100-percent consistency is not required at all
times, you can run a batch job or stored
procedure during off hours to reconcile
duplicate or derived data.
• You can run short, frequent batches or longer,
less frequent batches.
Cont…
Advantages vs. disadvantages
Advantages:-
• Precomputing derived data
• Minimizing the need for joins
• Reducing the number of foreign keys in
relations
• Reducing the number of relations.
disadvantages :-
• May speed up retrievals but can slow down
updates.
• Always application-specific and needs to be re-
evaluated in the application changes.
• Can increase the size of relations.
• May simplify implementation in some cases but
may make it more complex in other.
• reduce flexibility.
Summary
 Denormalization aids the process of adding
redundancy to the database to improve performance .
 Denormalize can be done with tables or columns.
 Require aknowledge of how data is being used .
 There are costs of denormalization reduces the
“integrity” of the design ,always slow DML (data
manipulation language) , need more memory space
to store redundant data and required additional
programming to maintain the denormalized data.
References
 Database design & Relational theory, C.J.Date
 Database system .8th edition.
 Data Normalization, Denormalization,and the Forces of Darkness
a white paper by Melissa Hollingsworth.
 www.icard.ru/~nail/sybase/perf/10.88.html
Q & A
Thanks you

More Related Content

What's hot

10. XML in DBMS
10. XML in DBMS10. XML in DBMS
10. XML in DBMS
koolkampus
 
Fundamentals of Database ppt ch03
Fundamentals of Database ppt ch03Fundamentals of Database ppt ch03
Fundamentals of Database ppt ch03
Jotham Gadot
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbms
Naresh Kumar
 

What's hot (20)

Data base security & integrity
Data base security &  integrityData base security &  integrity
Data base security & integrity
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
10. XML in DBMS
10. XML in DBMS10. XML in DBMS
10. XML in DBMS
 
Query processing and optimization (updated)
Query processing and optimization (updated)Query processing and optimization (updated)
Query processing and optimization (updated)
 
Data warehousing
Data warehousingData warehousing
Data warehousing
 
Types of keys dbms
Types of keys dbmsTypes of keys dbms
Types of keys dbms
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 
Fundamentals of Database ppt ch03
Fundamentals of Database ppt ch03Fundamentals of Database ppt ch03
Fundamentals of Database ppt ch03
 
Data cubes
Data cubesData cubes
Data cubes
 
View of data DBMS
View of data DBMSView of data DBMS
View of data DBMS
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbms
 
Indexing and Hashing
Indexing and HashingIndexing and Hashing
Indexing and Hashing
 
Data integrity
Data integrityData integrity
Data integrity
 
SQL Views
SQL ViewsSQL Views
SQL Views
 
multi dimensional data model
multi dimensional data modelmulti dimensional data model
multi dimensional data model
 
Basic Concept of Database
Basic Concept of DatabaseBasic Concept of Database
Basic Concept of Database
 
Star schema
Star schemaStar schema
Star schema
 
Relational algebra ppt
Relational algebra pptRelational algebra ppt
Relational algebra ppt
 
1.2 steps and functionalities
1.2 steps and functionalities1.2 steps and functionalities
1.2 steps and functionalities
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
 

Viewers also liked

Databases: Denormalisation
Databases: DenormalisationDatabases: Denormalisation
Databases: Denormalisation
Damian T. Gordon
 
4 the relational data model and relational database constraints
4 the relational data model and relational database constraints4 the relational data model and relational database constraints
4 the relational data model and relational database constraints
Kumar
 
Data warehouse-dimensional-modeling-and-design
Data warehouse-dimensional-modeling-and-designData warehouse-dimensional-modeling-and-design
Data warehouse-dimensional-modeling-and-design
Sarita Kataria
 

Viewers also liked (20)

Databases: Denormalisation
Databases: DenormalisationDatabases: Denormalisation
Databases: Denormalisation
 
Hierarchical Denormalization
Hierarchical DenormalizationHierarchical Denormalization
Hierarchical Denormalization
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)
 
DBMS - Normalization
DBMS - NormalizationDBMS - Normalization
DBMS - 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
 
Data base
Data baseData base
Data base
 
Lecture 9
Lecture 9Lecture 9
Lecture 9
 
The Relational Data Model and Relational Database Constraints
The Relational Data Model and Relational Database ConstraintsThe Relational Data Model and Relational Database Constraints
The Relational Data Model and Relational Database Constraints
 
Lecture 03 - The Data Warehouse and Design
Lecture 03 - The Data Warehouse and Design Lecture 03 - The Data Warehouse and Design
Lecture 03 - The Data Warehouse and Design
 
Sql join
Sql  joinSql  join
Sql join
 
Napkin folding final
Napkin folding finalNapkin folding final
Napkin folding final
 
4 the relational data model and relational database constraints
4 the relational data model and relational database constraints4 the relational data model and relational database constraints
4 the relational data model and relational database constraints
 
Data warehouse-dimensional-modeling-and-design
Data warehouse-dimensional-modeling-and-designData warehouse-dimensional-modeling-and-design
Data warehouse-dimensional-modeling-and-design
 
Rdbms
RdbmsRdbms
Rdbms
 
SQL Joins
SQL JoinsSQL Joins
SQL Joins
 
Compiler vs interpreter
Compiler vs interpreterCompiler vs interpreter
Compiler vs interpreter
 
High Level Language (HLL)
High Level Language (HLL)High Level Language (HLL)
High Level Language (HLL)
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
 
SQL JOIN
SQL JOINSQL JOIN
SQL JOIN
 
compiler vs interpreter
compiler vs interpretercompiler vs interpreter
compiler vs interpreter
 

Similar to Denormalization

When & Why\'s of Denormalization
When & Why\'s of DenormalizationWhen & Why\'s of Denormalization
When & Why\'s of Denormalization
Aliya Saldanha
 
database-stucture-and-space-managment.ppt
database-stucture-and-space-managment.pptdatabase-stucture-and-space-managment.ppt
database-stucture-and-space-managment.ppt
Iftikhar70
 
Myth busters - performance tuning 102 2008
Myth busters - performance tuning 102 2008Myth busters - performance tuning 102 2008
Myth busters - performance tuning 102 2008
paulguerin
 
Csld phan tan va song song
Csld phan tan va song songCsld phan tan va song song
Csld phan tan va song song
Lê Anh Trung
 

Similar to Denormalization (20)

De normalozation
De normalozationDe normalozation
De normalozation
 
Cs437 lecture 7-8
Cs437 lecture 7-8Cs437 lecture 7-8
Cs437 lecture 7-8
 
When & Why\'s of Denormalization
When & Why\'s of DenormalizationWhen & Why\'s of Denormalization
When & Why\'s of Denormalization
 
Rise of Column Oriented Database
Rise of Column Oriented DatabaseRise of Column Oriented Database
Rise of Column Oriented Database
 
Query Optimization in SQL Server
Query Optimization in SQL ServerQuery Optimization in SQL Server
Query Optimization in SQL Server
 
Systems and methods for improving database performance
Systems and methods for improving database performanceSystems and methods for improving database performance
Systems and methods for improving database performance
 
Data warehouse physical design
Data warehouse physical designData warehouse physical design
Data warehouse physical design
 
very large database
very large databasevery large database
very large database
 
Tableau Best Practices.pptx
Tableau Best Practices.pptxTableau Best Practices.pptx
Tableau Best Practices.pptx
 
Chapter 8(designing of documnt databases)no sql for mere mortals
Chapter 8(designing of documnt databases)no sql for mere mortalsChapter 8(designing of documnt databases)no sql for mere mortals
Chapter 8(designing of documnt databases)no sql for mere mortals
 
denormalization.ppt
denormalization.pptdenormalization.ppt
denormalization.ppt
 
database-stucture-and-space-managment.ppt
database-stucture-and-space-managment.pptdatabase-stucture-and-space-managment.ppt
database-stucture-and-space-managment.ppt
 
database-stucture-and-space-managment.ppt
database-stucture-and-space-managment.pptdatabase-stucture-and-space-managment.ppt
database-stucture-and-space-managment.ppt
 
Dal deck
Dal deckDal deck
Dal deck
 
Myth busters - performance tuning 102 2008
Myth busters - performance tuning 102 2008Myth busters - performance tuning 102 2008
Myth busters - performance tuning 102 2008
 
PostgreSQL Table Partitioning / Sharding
PostgreSQL Table Partitioning / ShardingPostgreSQL Table Partitioning / Sharding
PostgreSQL Table Partitioning / Sharding
 
Csld phan tan va song song
Csld phan tan va song songCsld phan tan va song song
Csld phan tan va song song
 
UNIT3 DBMS.pptx operation nd management of data base
UNIT3 DBMS.pptx operation nd management of data baseUNIT3 DBMS.pptx operation nd management of data base
UNIT3 DBMS.pptx operation nd management of data base
 
Case Study: A Multi-Source Time Variant Data warehouse
Case Study: A Multi-Source Time Variant Data warehouseCase Study: A Multi-Source Time Variant Data warehouse
Case Study: A Multi-Source Time Variant Data warehouse
 
RELATIONAL MODEL OF DATABASES AND OTHER CONCEPTS OF DATABASES​
RELATIONAL MODEL OF DATABASES AND OTHER CONCEPTS OF DATABASES​RELATIONAL MODEL OF DATABASES AND OTHER CONCEPTS OF DATABASES​
RELATIONAL MODEL OF DATABASES AND OTHER CONCEPTS OF DATABASES​
 

Recently uploaded

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 

Recently uploaded (20)

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 

Denormalization

  • 1. ‫الرحيم‬‫الرحمن‬‫هللا‬ ‫بسم‬ By:- 1- Amna Magzoub 2- Selma Yahyia 3- Ala Eltayeb Denormalization
  • 2. Objectives:-  Introduction  Definition Why and when to denormalize data Method of denormalization Manage denormalization data Advantages and disadvantages of denormalization  References
  • 3. Introduction • Result of normalization is a design that is structurally consistent with minimal redundancy. • However, sometimes a normalized database does not provide maximum processing efficiency. • May be necessary to accept loss of some benefits of a fully normalized design in favor of performance.
  • 4. Definition :- Denormalization is a process of combine two relation into one new relation.  Denormalization is the process of taking a normalized database and modifying table structures to allow controlled redundancy for increased database performance.
  • 5. Cont..  The argument in favor of denormalization is basically that it makes retrievals esaier to express and makes the perform better. It sometimes claimed to make the database easier to understand.
  • 6. When and why to denormailize Some issues need to be considered before denormalization: 1- Is the system’s performance unacceptable with fully normalized data? Meet a client and do some testing. 2- If the performance is unacceptable, will denormalizing make it acceptable? 3- If you denormalize to clear those bottlenecks, will the system and its data still be reliable?
  • 7. Cont…  Speed up retrievals.  A strict performance is required.  It is not heavily updated. - So, denormalize only when there is a very clear advantage to doing.
  • 9. Method of denormalization:- 1) Adding Redundant Columns. 2) Adding Derived Columns 3) Combining Tables 4) Repeating Groups 5) Creating extract tables 6) Partitioning Relations
  • 10. Adding Redundant Columns • You can add redundant columns to eliminate frequent joins. For example, if frequent joins are performed on the titleauthor and authors tables in order to retrieve the author's last name, you can add the au_lname column to titleauthor.
  • 11.
  • 12. • Adding redundant columns eliminates joins for many queries. The problems with this solution are that it: • Requires maintenance of new column. All changes must be made to two tables, and possibly to many rows in one of the tables. • Requires more disk space, since au_lname is duplicated.
  • 13. Adding Derived Columns • Adding derived columns can help eliminate joins and reduce the time needed to produce aggregate values. • The example shows both benefits. Frequent joins are needed between the titleauthor and titles tables to provide the total advance for a particular book title.
  • 14.
  • 15. • You can create and maintain a derived data column in the titles table, eliminating both the join and the aggregate at run time. This increases storage needs, and requires maintenance of the derived column whenever changes are made to the titles table.
  • 16. Combining Tables • If most users need to see the full set of joined data from two tables, collapsing the two tables into one can improve performance by eliminating the join. • For example, users frequently need to see the author name, author ID, and the blurbs copy data at the same time. The solution is to collapse the two tables into one. The data from the two tables must be in a one-to-one relationship to collapse tables.
  • 17.
  • 19. Repeating Groups These repeating groups can be stored as a nested table within the original table.
  • 21.
  • 22. Creating extract tables • Reports can access derived data and perform multi-relation joins on same set of base relations. However, data the report is based on may be relatively static or may not have to be current. • Possible to create a single, highly denormalized extract table based on relations required by reports, and allow users to access extract table directly instead of base relations.
  • 23. Partitioning Relations • Rather than combining relations together, alternative approach is to decompose them into a number of smaller and more manageable partitions. • Two main types of partitioning:- horizontal and vertical.
  • 24. Horizontal :- Distributing the tuples of relation across a number of (smaller) partitioning relation. Vertical :- Distributing the attributes of a relation a cross a number of (smaller) partitioning relation(the primary key duplicated to allow the original relation to be reconstucted.
  • 25.
  • 26. Horizanteial:- •Separate data into partitions so that queries do not need to examine all data in a table when WHERE clause filters specify only a subset of the partitions. •Horizontal splitting can also be more secure since file level of security can be used to prohibit users from seeing certain rows of data
  • 27. The example shows how the authors table might be split to separate active and inactive authors:
  • 28. Vertical Splitting: • Vertical splitting can be used when some columns are rarely accessed rather than other columns
  • 29. The example shows how the authors table can be partitioned.
  • 31. Managing Denormalized Data Whatever denormalization techniques you use, you need to develop management techniques to ensure data integrity. Choices include: • Triggers, which can update derived or duplicated data anytime the base data changes.
  • 32.
  • 33. • Application logic, using transactions in each application that updates denormalized data to be sure that changes are atomic.
  • 34. Cont… • Batch reconciliation, run at appropriate intervals to bring the denormalized data back into agreement. • If 100-percent consistency is not required at all times, you can run a batch job or stored procedure during off hours to reconcile duplicate or derived data. • You can run short, frequent batches or longer, less frequent batches.
  • 36. Advantages vs. disadvantages Advantages:- • Precomputing derived data • Minimizing the need for joins • Reducing the number of foreign keys in relations • Reducing the number of relations.
  • 37. disadvantages :- • May speed up retrievals but can slow down updates. • Always application-specific and needs to be re- evaluated in the application changes. • Can increase the size of relations. • May simplify implementation in some cases but may make it more complex in other. • reduce flexibility.
  • 38. Summary  Denormalization aids the process of adding redundancy to the database to improve performance .  Denormalize can be done with tables or columns.  Require aknowledge of how data is being used .  There are costs of denormalization reduces the “integrity” of the design ,always slow DML (data manipulation language) , need more memory space to store redundant data and required additional programming to maintain the denormalized data.
  • 39. References  Database design & Relational theory, C.J.Date  Database system .8th edition.  Data Normalization, Denormalization,and the Forces of Darkness a white paper by Melissa Hollingsworth.  www.icard.ru/~nail/sybase/perf/10.88.html
  • 40. Q & A