SlideShare a Scribd company logo
1 of 45
Database
Systems
Presentation
Topic: Denormalization
Group Members:
Sohail Haider
Abdul Wahab
Mehmood Akhter
What is Denormalization
Denormalization refers to a refinement to the relational
schema such that the degree of normalization for a
modified relation is less than the degree of at least one of
the original relations.
Denormalization can also be referred to a process in
which we combine two relations into one new relation,
and the new relation is still normalized but contains more
nulls than the original relations.
Normalization
Normalization is a logical database design that is
structurally consistent and has minimal redundancy.
Normalization forces us to understand completely each
attribute that has to be represented in the database. This
may be the most important factor that contributes to the
overall success of the system.
Normalization (Continued)
In addition, the following factors have to be considered:
denormalization makes implementation more complex;
denormalization often sacrifices flexibility;
denormalization may speed up retrievals but it slows
down updates.
Then why to denormalize
relations
It is sometimes argued that a normalized database
design does not provide maximum processing efficiency.
There may be circumstances where it may be necessary
to accept the loss of some of the benefits of a fully
normalized design in favor of performance.
Steps of Denormalization
1. Combining one-to-one (1:1) relationships
2. Duplicating non-key attributes in one-to-many (1:*)
relationships to reduce joins
3. Duplicating foreign key attributes in one-to-many (1:*)
relationships to reduce joins
4. Duplicating attributes in many-to-many (*:*) relationships
to reduce joins
5. Introducing repeating groups
6. Creating extract tables
7. Partitioning relations
1. Combining one-to-one (1:1)
relationships
Re-examine one-to-one (1:1) relationships to determine
the effects of combining the relations into a single
relation.
Combination should only be considered for relations that
are frequently referenced together and infrequently
referenced separately.
Example
Consider the 1:1 relationship between “client” and
“interview”.
• The Client relation contains information on potential
renters of property; the Interview relation contains the
date of the interview and comments made by a member
of staff about a Client.
Example (Continued)
We could combine these two relations together to form a
new relation ClientInterview.
There may be a significant number of nulls in the
combined relation ClientInterview depending on the
proportion of tuples involved in the participation.
If the original Client relation is large and the proportion of
tuples involved in the participation is small, there will be a
significant amount of wasted space.
Example (Continued)
2. Duplicating non-key attributes in
one-to-many (1:*) relationships to
reduce joins
In this step we aim to reduce or remove joins from
frequent or critical queries by duplicating non-key
attributes in 1:* relationships.
Example
Consider the relations PropertyForRent and PrivateOwner.
Example (Continued)
Whenever the PropertyForRent relation is accessed, it is
very common for the owner‟s name to be accessed at the
same time.
We need to write the following query everytime to access
this:
Example (Continued)
By duplicating the lName attribute in the PropertyForRent
relation, PrivateOwner relation can be removed from the
query.
Disadvantages of Step 2
The potential for loss of integrity is considerable.
Additional time that is required to maintain consistency
automatically every time a tuple is inserted, updated, or
deleted.
Increase in storage space resulting from the duplication.
3. Duplicating foreign key attributes
in one-to-many (1:*)
relationship to reduce joins
The aim of this step is also to reduce or remove joins
from frequent or critical queries, but this time by
duplicating foreign key attributes in one-to-many (1:*)
relationship.
Example
Again consider the relations PropertyForRent and
PrivateOwner.
Example (Continued)
In order to list all the private property owners at a branch,
following query will be used:
SELECT o.lName
FROM PropertyForRent p, PrivateOwner o
WHERE p.ownerNo = o.ownerNo AND branchNo =
„B003‟;
The need for this join can be removed by duplicating the
foreign key branchNo in the PrivateOwner relation.
Example (Continued)This can be done by introducing a direct relationship between the Branch and
PrivateOwner relations.
Thus the query could be simplified to:
SELECT o.lName
FROM PrivateOwner o
WHERE branchNo = „B003‟;
Example (Continued)
Before:
SELECT o.lName
FROM PropertyForRent p, PrivateOwner o
WHERE p.ownerNo = o.ownerNo AND branchNo = „B003‟;
After:
SELECT o.lName
FROM PrivateOwner o
WHERE branchNo = „B003‟;
4. Duplicating attributes in many-
to-many (*:*) relationships to
reduce joins
In some circumstances, it may be possible to reduce the
number of relations to be joined by duplicating attributes
from one of the original entities in the intermediate
relation.
Example
Consider the relations Client, PropertyForRent and
Viewing.
Example (Continued)
Suppose that sales staff need to contact clients who have
still to make a comment on the properties they have
viewed. They need only the street attribute of the property
when talking to the clients. The query for this will be:
Example (Continued)
Duplicating the street attribute in the intermediate Viewing
relation can remove the PropertyForRent relation from
the query, giving the query:
SELECT c.*, v.street, v.viewDate
FROM Client c, Viewing v
WHERE c.clientNo = v.clientNo AND comment IS NULL;
5. Introducing repeating groups
In this step repeating groups that were eliminated from the
logical data model as a result of the requirement that all
entities be in first normal form are re-introduced.
Other than that repeating groups which were separated
out into a new relation, forming a 1:* relationship with the
original (parent) relation are re-combined.
In general, this type of denormalization should be
considered only in the following circumstances:
1. the absolute number of items in the repeating group is
known.
2. the number is static and will not change over time/
3. the number is not very large, typically not greater than
10, although this is not as important as the first two
conditions.
Example
Consider Branch and Telephone relations.
First both these relations are re-combined.
Example (Continued)
then telephone details in the original Branch relation, with
one attribute for each telephone as follows:
6. Creating extract tables
In this step a single, highly denormalized extract table
based on the relations required by the reports.
It allow the users to access the extract table directly
instead of the base relations.
Why to create extract tables
This may be for situations where reports have to be run at
peak times during the day.
The most common technique for producing extract tables
is to create and populate the tables in an overnight batch
run when the system is lightly loaded.
7. Partitioning relations
Decomposing relations into a number of smaller and more
manageable pieces called partitions.
This is an alternative approach that addresses the key
problem with supporting very large relations (and indexes)
rather than combining relations together.
There are two main types of partitioning:
1. Horizontal partitioning
2. Vertical partitioning.
Types of Partitioning
Horizontal:
Distributing the tuples of a relation across a number of
(smaller) partitioning relations.
Vertical:
Distributing the attributes of a relation across a number of
(smaller) partitioning relations (the primary key is
duplicated to allow the original relation to be
reconstructed).
Partitioning (Continued)
Other types of Partitioning
Range:
In this type each partition is defined by a range of values
for one or more attributes.
List
In this type each partition is defined by a list of values for
an attribute.
Range–hash and List–hash:
In this type each partition is defined by a range or a list of
values and then each partition is further subdivided based
on a hash function
Example (Horizontal
Partitioning)
Suppose DreamHome maintains an
ArchivedPropertyForRent relation with several hundreds
of thousands of tuples that are held indefinitely for analysis
purposes.
Searching for a particular tuple at a branch could be quite
time consuming.
We could reduce this time by horizontally partitioning the
relation, with one partition for each branch.
Example (Continued)
We can create a (hash) partition for this scenario in Oracle
using the SQL statement
Advantages of Partitioning
Partitioning has a number of advantages:
Improved load balancing
Improved performance
Increased availability
Improved recovery
Security
Disadvantages of Partitioning
Partitioning can also have a number of disadvantages:
Complexity
Reduced performance
Duplication
Implications of denormalization
There are a number of implications of denormalization.
Data integrity must be maintained.
Common solutions for maintaining it are:
Triggers:
Triggers can be used to automate the updating of derived or
duplicated data.
Transactions:
Build transactions into each application that make the
updates to denormalized data as a single (atomic) action.
Batch reconciliation:
Run batch programs at appropriate times to make the
denormalized data consistent.
Advantages of Denormalization
Denormalization can improve performance by:
precomputing derived data;
minimizing the need for joins;
reducing the number of foreign keys in relations;
reducing the number indexes (thereby saving storage
space);
reducing the number of relations.
Disadvantages of
DenormalizationDisadvantages of Denormalization are:
May speed up retrievals but can slow down updates.
Always application-specific and needs to be re-evaluated if
the application changes.
Can increase the size of relations.
May simplify implementation in some cases but may make
it more complex in others.
Sacrifices flexibility.
Questions?
Thank you

More Related Content

What's hot

Basic Concept of Database
Basic Concept of DatabaseBasic Concept of Database
Basic Concept of DatabaseMarlon Jamera
 
12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMSkoolkampus
 
05 Clustering in Data Mining
05 Clustering in Data Mining05 Clustering in Data Mining
05 Clustering in Data MiningValerii Klymchuk
 
Cardinality and participation constraints
Cardinality and participation constraintsCardinality and participation constraints
Cardinality and participation constraintsNikhil Deswal
 
Database Normalization
Database NormalizationDatabase Normalization
Database NormalizationArun Sharma
 
Enhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) ModelingEnhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) Modelingsontumax
 
3 Tier Architecture
3  Tier Architecture3  Tier Architecture
3 Tier ArchitectureWebx
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMSkoolkampus
 
Data Redundancy & Update Anomalies
Data Redundancy & Update AnomaliesData Redundancy & Update Anomalies
Data Redundancy & Update AnomaliesJens Patel
 
Function oriented design
Function oriented designFunction oriented design
Function oriented designVidhun T
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data ModelSmriti Jain
 
Er to tables
Er to tablesEr to tables
Er to tablesGGCMP3R
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational modelChirag vasava
 
Distributed Database System
Distributed Database SystemDistributed Database System
Distributed Database SystemSulemang
 

What's hot (20)

Basic Concept of Database
Basic Concept of DatabaseBasic Concept of Database
Basic Concept of Database
 
12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS
 
05 Clustering in Data Mining
05 Clustering in Data Mining05 Clustering in Data Mining
05 Clustering in Data Mining
 
Data models
Data modelsData models
Data models
 
Cardinality and participation constraints
Cardinality and participation constraintsCardinality and participation constraints
Cardinality and participation constraints
 
Relational model
Relational modelRelational model
Relational model
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
Enhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) ModelingEnhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) Modeling
 
SQL Views
SQL ViewsSQL Views
SQL Views
 
3 Tier Architecture
3  Tier Architecture3  Tier Architecture
3 Tier Architecture
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS
 
Layered Software Architecture
Layered Software ArchitectureLayered Software Architecture
Layered Software Architecture
 
DBMS
DBMSDBMS
DBMS
 
Data Redundancy & Update Anomalies
Data Redundancy & Update AnomaliesData Redundancy & Update Anomalies
Data Redundancy & Update Anomalies
 
Function oriented design
Function oriented designFunction oriented design
Function oriented design
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data Model
 
Data models
Data modelsData models
Data models
 
Er to tables
Er to tablesEr to tables
Er to tables
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
 
Distributed Database System
Distributed Database SystemDistributed Database System
Distributed Database System
 

Viewers also liked

Introduction to Software - Coder Forge - John Mulhall
Introduction to Software - Coder Forge - John MulhallIntroduction to Software - Coder Forge - John Mulhall
Introduction to Software - Coder Forge - John MulhallJohn Mulhall
 
The relational data model part[1]
The relational data model part[1]The relational data model part[1]
The relational data model part[1]Bashir Rezaie
 
3. Relational Models in DBMS
3. Relational Models in DBMS3. Relational Models in DBMS
3. Relational Models in DBMSkoolkampus
 
Introduction to RDBMS
Introduction to RDBMSIntroduction to RDBMS
Introduction to RDBMSSarmad Ali
 
Fundamentals of database system - Relational data model and relational datab...
Fundamentals of database system  - Relational data model and relational datab...Fundamentals of database system  - Relational data model and relational datab...
Fundamentals of database system - Relational data model and relational datab...Mustafa Kamel Mohammadi
 
Urinary system embryology
Urinary system embryologyUrinary system embryology
Urinary system embryologyishtiaqqazi
 
Relational database management system (rdbms) i
Relational database management system (rdbms) iRelational database management system (rdbms) i
Relational database management system (rdbms) iRavinder Kamboj
 
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 constraintsKumar
 
14. Query Optimization in DBMS
14. Query Optimization in DBMS14. Query Optimization in DBMS
14. Query Optimization in DBMSkoolkampus
 
Rdbms
RdbmsRdbms
Rdbmsrdbms
 

Viewers also liked (12)

Introduction to Software - Coder Forge - John Mulhall
Introduction to Software - Coder Forge - John MulhallIntroduction to Software - Coder Forge - John Mulhall
Introduction to Software - Coder Forge - John Mulhall
 
The relational data model part[1]
The relational data model part[1]The relational data model part[1]
The relational data model part[1]
 
3. Relational Models in DBMS
3. Relational Models in DBMS3. Relational Models in DBMS
3. Relational Models in DBMS
 
Introduction to RDBMS
Introduction to RDBMSIntroduction to RDBMS
Introduction to RDBMS
 
Fundamentals of database system - Relational data model and relational datab...
Fundamentals of database system  - Relational data model and relational datab...Fundamentals of database system  - Relational data model and relational datab...
Fundamentals of database system - Relational data model and relational datab...
 
Urinary system embryology
Urinary system embryologyUrinary system embryology
Urinary system embryology
 
Relational database management system (rdbms) i
Relational database management system (rdbms) iRelational database management system (rdbms) i
Relational database management system (rdbms) i
 
Rdbms
RdbmsRdbms
Rdbms
 
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
 
RDBMS.ppt
RDBMS.pptRDBMS.ppt
RDBMS.ppt
 
14. Query Optimization in DBMS
14. Query Optimization in DBMS14. Query Optimization in DBMS
14. Query Optimization in DBMS
 
Rdbms
RdbmsRdbms
Rdbms
 

Similar to DB Denormalization Presentation

introduction of database in DBMS
introduction of database in DBMSintroduction of database in DBMS
introduction of database in DBMSAbhishekRajpoot8
 
Data Warehouse ( Dw Of Dwh )
Data Warehouse ( Dw Of Dwh )Data Warehouse ( Dw Of Dwh )
Data Warehouse ( Dw Of Dwh )Jenny Calhoon
 
Databases: Denormalisation
Databases: DenormalisationDatabases: Denormalisation
Databases: DenormalisationDamian T. Gordon
 
When & Why\'s of Denormalization
When & Why\'s of DenormalizationWhen & Why\'s of Denormalization
When & Why\'s of DenormalizationAliya Saldanha
 
MODULE 3 -Normalization bwdhwbifnweipfnewknfqekndd_1.ppt
MODULE 3 -Normalization bwdhwbifnweipfnewknfqekndd_1.pptMODULE 3 -Normalization bwdhwbifnweipfnewknfqekndd_1.ppt
MODULE 3 -Normalization bwdhwbifnweipfnewknfqekndd_1.pptHemaSenthil5
 
Design dbms
Design dbmsDesign dbms
Design dbmsIIITA
 
Lecture 9 - SOA in Context
Lecture 9 - SOA in ContextLecture 9 - SOA in Context
Lecture 9 - SOA in Contextphanleson
 
MODULE 3 -Normalization_1.ppt moduled in design
MODULE 3 -Normalization_1.ppt moduled in designMODULE 3 -Normalization_1.ppt moduled in design
MODULE 3 -Normalization_1.ppt moduled in designHemaSenthil5
 
Nhibernate Part 1
Nhibernate   Part 1Nhibernate   Part 1
Nhibernate Part 1guest075fec
 
Seminar - Scalable Enterprise Application Development Using DDD and CQRS
Seminar - Scalable Enterprise Application Development Using DDD and CQRSSeminar - Scalable Enterprise Application Development Using DDD and CQRS
Seminar - Scalable Enterprise Application Development Using DDD and CQRSMizanur Sarker
 
Dbms important questions and answers
Dbms important questions and answersDbms important questions and answers
Dbms important questions and answersLakshmiSarvani6
 
Software architecture case study - why and why not sql server replication
Software architecture   case study - why and why not sql server replicationSoftware architecture   case study - why and why not sql server replication
Software architecture case study - why and why not sql server replicationShahzad
 

Similar to DB Denormalization Presentation (20)

Hw fdb(2)
Hw fdb(2)Hw fdb(2)
Hw fdb(2)
 
Hw fdb(2)
Hw fdb(2)Hw fdb(2)
Hw fdb(2)
 
introduction of database in DBMS
introduction of database in DBMSintroduction of database in DBMS
introduction of database in DBMS
 
Data Warehouse ( Dw Of Dwh )
Data Warehouse ( Dw Of Dwh )Data Warehouse ( Dw Of Dwh )
Data Warehouse ( Dw Of Dwh )
 
Cs437 lecture 7-8
Cs437 lecture 7-8Cs437 lecture 7-8
Cs437 lecture 7-8
 
Databases: Denormalisation
Databases: DenormalisationDatabases: Denormalisation
Databases: Denormalisation
 
When & Why\'s of Denormalization
When & Why\'s of DenormalizationWhen & Why\'s of Denormalization
When & Why\'s of Denormalization
 
De normalozation
De normalozationDe normalozation
De normalozation
 
MODULE 3 -Normalization bwdhwbifnweipfnewknfqekndd_1.ppt
MODULE 3 -Normalization bwdhwbifnweipfnewknfqekndd_1.pptMODULE 3 -Normalization bwdhwbifnweipfnewknfqekndd_1.ppt
MODULE 3 -Normalization bwdhwbifnweipfnewknfqekndd_1.ppt
 
Design dbms
Design dbmsDesign dbms
Design dbms
 
Lecture 9 - SOA in Context
Lecture 9 - SOA in ContextLecture 9 - SOA in Context
Lecture 9 - SOA in Context
 
DBMS.pdf
DBMS.pdfDBMS.pdf
DBMS.pdf
 
MODULE 3 -Normalization_1.ppt moduled in design
MODULE 3 -Normalization_1.ppt moduled in designMODULE 3 -Normalization_1.ppt moduled in design
MODULE 3 -Normalization_1.ppt moduled in design
 
Rdbms
RdbmsRdbms
Rdbms
 
Nhibernate Part 1
Nhibernate   Part 1Nhibernate   Part 1
Nhibernate Part 1
 
Database System.pptx
Database System.pptxDatabase System.pptx
Database System.pptx
 
Seminar - Scalable Enterprise Application Development Using DDD and CQRS
Seminar - Scalable Enterprise Application Development Using DDD and CQRSSeminar - Scalable Enterprise Application Development Using DDD and CQRS
Seminar - Scalable Enterprise Application Development Using DDD and CQRS
 
D B M S Animate
D B M S AnimateD B M S Animate
D B M S Animate
 
Dbms important questions and answers
Dbms important questions and answersDbms important questions and answers
Dbms important questions and answers
 
Software architecture case study - why and why not sql server replication
Software architecture   case study - why and why not sql server replicationSoftware architecture   case study - why and why not sql server replication
Software architecture case study - why and why not sql server replication
 

Recently uploaded

(Rocky) Jaipur Call Girl - 09521753030 Escorts Service 50% Off with Cash ON D...
(Rocky) Jaipur Call Girl - 09521753030 Escorts Service 50% Off with Cash ON D...(Rocky) Jaipur Call Girl - 09521753030 Escorts Service 50% Off with Cash ON D...
(Rocky) Jaipur Call Girl - 09521753030 Escorts Service 50% Off with Cash ON D...indiancallgirl4rent
 
Low Rate Call Girls Kochi Anika 8250192130 Independent Escort Service Kochi
Low Rate Call Girls Kochi Anika 8250192130 Independent Escort Service KochiLow Rate Call Girls Kochi Anika 8250192130 Independent Escort Service Kochi
Low Rate Call Girls Kochi Anika 8250192130 Independent Escort Service KochiSuhani Kapoor
 
Top Rated Bangalore Call Girls Richmond Circle ⟟ 8250192130 ⟟ Call Me For Gen...
Top Rated Bangalore Call Girls Richmond Circle ⟟ 8250192130 ⟟ Call Me For Gen...Top Rated Bangalore Call Girls Richmond Circle ⟟ 8250192130 ⟟ Call Me For Gen...
Top Rated Bangalore Call Girls Richmond Circle ⟟ 8250192130 ⟟ Call Me For Gen...narwatsonia7
 
Call Girls Faridabad Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Faridabad Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Faridabad Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Faridabad Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
Lucknow Call girls - 8800925952 - 24x7 service with hotel room
Lucknow Call girls - 8800925952 - 24x7 service with hotel roomLucknow Call girls - 8800925952 - 24x7 service with hotel room
Lucknow Call girls - 8800925952 - 24x7 service with hotel roomdiscovermytutordmt
 
Night 7k to 12k Navi Mumbai Call Girl Photo 👉 BOOK NOW 9833363713 👈 ♀️ night ...
Night 7k to 12k Navi Mumbai Call Girl Photo 👉 BOOK NOW 9833363713 👈 ♀️ night ...Night 7k to 12k Navi Mumbai Call Girl Photo 👉 BOOK NOW 9833363713 👈 ♀️ night ...
Night 7k to 12k Navi Mumbai Call Girl Photo 👉 BOOK NOW 9833363713 👈 ♀️ night ...aartirawatdelhi
 
Russian Call Girls in Jaipur Riya WhatsApp ❤8445551418 VIP Call Girls Jaipur
Russian Call Girls in Jaipur Riya WhatsApp ❤8445551418 VIP Call Girls JaipurRussian Call Girls in Jaipur Riya WhatsApp ❤8445551418 VIP Call Girls Jaipur
Russian Call Girls in Jaipur Riya WhatsApp ❤8445551418 VIP Call Girls Jaipurparulsinha
 
Best Rate (Hyderabad) Call Girls Jahanuma ⟟ 8250192130 ⟟ High Class Call Girl...
Best Rate (Hyderabad) Call Girls Jahanuma ⟟ 8250192130 ⟟ High Class Call Girl...Best Rate (Hyderabad) Call Girls Jahanuma ⟟ 8250192130 ⟟ High Class Call Girl...
Best Rate (Hyderabad) Call Girls Jahanuma ⟟ 8250192130 ⟟ High Class Call Girl...astropune
 
Russian Escorts Girls Nehru Place ZINATHI 🔝9711199012 ☪ 24/7 Call Girls Delhi
Russian Escorts Girls  Nehru Place ZINATHI 🔝9711199012 ☪ 24/7 Call Girls DelhiRussian Escorts Girls  Nehru Place ZINATHI 🔝9711199012 ☪ 24/7 Call Girls Delhi
Russian Escorts Girls Nehru Place ZINATHI 🔝9711199012 ☪ 24/7 Call Girls DelhiAlinaDevecerski
 
VIP Call Girls Indore Kirti 💚😋 9256729539 🚀 Indore Escorts
VIP Call Girls Indore Kirti 💚😋  9256729539 🚀 Indore EscortsVIP Call Girls Indore Kirti 💚😋  9256729539 🚀 Indore Escorts
VIP Call Girls Indore Kirti 💚😋 9256729539 🚀 Indore Escortsaditipandeya
 
Call Girls Varanasi Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Varanasi Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Varanasi Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Varanasi Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
VIP Russian Call Girls in Varanasi Samaira 8250192130 Independent Escort Serv...
VIP Russian Call Girls in Varanasi Samaira 8250192130 Independent Escort Serv...VIP Russian Call Girls in Varanasi Samaira 8250192130 Independent Escort Serv...
VIP Russian Call Girls in Varanasi Samaira 8250192130 Independent Escort Serv...Neha Kaur
 
Call Girls Jabalpur Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Jabalpur Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Jabalpur Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Jabalpur Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
Call Girls Ludhiana Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
Call Girls Aurangabad Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Aurangabad Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Aurangabad Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Aurangabad Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
Top Rated Hyderabad Call Girls Erragadda ⟟ 6297143586 ⟟ Call Me For Genuine ...
Top Rated  Hyderabad Call Girls Erragadda ⟟ 6297143586 ⟟ Call Me For Genuine ...Top Rated  Hyderabad Call Girls Erragadda ⟟ 6297143586 ⟟ Call Me For Genuine ...
Top Rated Hyderabad Call Girls Erragadda ⟟ 6297143586 ⟟ Call Me For Genuine ...chandars293
 
Book Paid Powai Call Girls Mumbai 𖠋 9930245274 𖠋Low Budget Full Independent H...
Book Paid Powai Call Girls Mumbai 𖠋 9930245274 𖠋Low Budget Full Independent H...Book Paid Powai Call Girls Mumbai 𖠋 9930245274 𖠋Low Budget Full Independent H...
Book Paid Powai Call Girls Mumbai 𖠋 9930245274 𖠋Low Budget Full Independent H...Call Girls in Nagpur High Profile
 
Call Girls Bangalore Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Bangalore Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Bangalore Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Bangalore Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
Premium Call Girls Cottonpet Whatsapp 7001035870 Independent Escort Service
Premium Call Girls Cottonpet Whatsapp 7001035870 Independent Escort ServicePremium Call Girls Cottonpet Whatsapp 7001035870 Independent Escort Service
Premium Call Girls Cottonpet Whatsapp 7001035870 Independent Escort Servicevidya singh
 
Call Girls Nagpur Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Nagpur Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Nagpur Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Nagpur Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 

Recently uploaded (20)

(Rocky) Jaipur Call Girl - 09521753030 Escorts Service 50% Off with Cash ON D...
(Rocky) Jaipur Call Girl - 09521753030 Escorts Service 50% Off with Cash ON D...(Rocky) Jaipur Call Girl - 09521753030 Escorts Service 50% Off with Cash ON D...
(Rocky) Jaipur Call Girl - 09521753030 Escorts Service 50% Off with Cash ON D...
 
Low Rate Call Girls Kochi Anika 8250192130 Independent Escort Service Kochi
Low Rate Call Girls Kochi Anika 8250192130 Independent Escort Service KochiLow Rate Call Girls Kochi Anika 8250192130 Independent Escort Service Kochi
Low Rate Call Girls Kochi Anika 8250192130 Independent Escort Service Kochi
 
Top Rated Bangalore Call Girls Richmond Circle ⟟ 8250192130 ⟟ Call Me For Gen...
Top Rated Bangalore Call Girls Richmond Circle ⟟ 8250192130 ⟟ Call Me For Gen...Top Rated Bangalore Call Girls Richmond Circle ⟟ 8250192130 ⟟ Call Me For Gen...
Top Rated Bangalore Call Girls Richmond Circle ⟟ 8250192130 ⟟ Call Me For Gen...
 
Call Girls Faridabad Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Faridabad Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Faridabad Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Faridabad Just Call 9907093804 Top Class Call Girl Service Available
 
Lucknow Call girls - 8800925952 - 24x7 service with hotel room
Lucknow Call girls - 8800925952 - 24x7 service with hotel roomLucknow Call girls - 8800925952 - 24x7 service with hotel room
Lucknow Call girls - 8800925952 - 24x7 service with hotel room
 
Night 7k to 12k Navi Mumbai Call Girl Photo 👉 BOOK NOW 9833363713 👈 ♀️ night ...
Night 7k to 12k Navi Mumbai Call Girl Photo 👉 BOOK NOW 9833363713 👈 ♀️ night ...Night 7k to 12k Navi Mumbai Call Girl Photo 👉 BOOK NOW 9833363713 👈 ♀️ night ...
Night 7k to 12k Navi Mumbai Call Girl Photo 👉 BOOK NOW 9833363713 👈 ♀️ night ...
 
Russian Call Girls in Jaipur Riya WhatsApp ❤8445551418 VIP Call Girls Jaipur
Russian Call Girls in Jaipur Riya WhatsApp ❤8445551418 VIP Call Girls JaipurRussian Call Girls in Jaipur Riya WhatsApp ❤8445551418 VIP Call Girls Jaipur
Russian Call Girls in Jaipur Riya WhatsApp ❤8445551418 VIP Call Girls Jaipur
 
Best Rate (Hyderabad) Call Girls Jahanuma ⟟ 8250192130 ⟟ High Class Call Girl...
Best Rate (Hyderabad) Call Girls Jahanuma ⟟ 8250192130 ⟟ High Class Call Girl...Best Rate (Hyderabad) Call Girls Jahanuma ⟟ 8250192130 ⟟ High Class Call Girl...
Best Rate (Hyderabad) Call Girls Jahanuma ⟟ 8250192130 ⟟ High Class Call Girl...
 
Russian Escorts Girls Nehru Place ZINATHI 🔝9711199012 ☪ 24/7 Call Girls Delhi
Russian Escorts Girls  Nehru Place ZINATHI 🔝9711199012 ☪ 24/7 Call Girls DelhiRussian Escorts Girls  Nehru Place ZINATHI 🔝9711199012 ☪ 24/7 Call Girls Delhi
Russian Escorts Girls Nehru Place ZINATHI 🔝9711199012 ☪ 24/7 Call Girls Delhi
 
VIP Call Girls Indore Kirti 💚😋 9256729539 🚀 Indore Escorts
VIP Call Girls Indore Kirti 💚😋  9256729539 🚀 Indore EscortsVIP Call Girls Indore Kirti 💚😋  9256729539 🚀 Indore Escorts
VIP Call Girls Indore Kirti 💚😋 9256729539 🚀 Indore Escorts
 
Call Girls Varanasi Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Varanasi Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Varanasi Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Varanasi Just Call 9907093804 Top Class Call Girl Service Available
 
VIP Russian Call Girls in Varanasi Samaira 8250192130 Independent Escort Serv...
VIP Russian Call Girls in Varanasi Samaira 8250192130 Independent Escort Serv...VIP Russian Call Girls in Varanasi Samaira 8250192130 Independent Escort Serv...
VIP Russian Call Girls in Varanasi Samaira 8250192130 Independent Escort Serv...
 
Call Girls Jabalpur Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Jabalpur Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Jabalpur Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Jabalpur Just Call 9907093804 Top Class Call Girl Service Available
 
Call Girls Ludhiana Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 9907093804 Top Class Call Girl Service Available
 
Call Girls Aurangabad Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Aurangabad Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Aurangabad Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Aurangabad Just Call 9907093804 Top Class Call Girl Service Available
 
Top Rated Hyderabad Call Girls Erragadda ⟟ 6297143586 ⟟ Call Me For Genuine ...
Top Rated  Hyderabad Call Girls Erragadda ⟟ 6297143586 ⟟ Call Me For Genuine ...Top Rated  Hyderabad Call Girls Erragadda ⟟ 6297143586 ⟟ Call Me For Genuine ...
Top Rated Hyderabad Call Girls Erragadda ⟟ 6297143586 ⟟ Call Me For Genuine ...
 
Book Paid Powai Call Girls Mumbai 𖠋 9930245274 𖠋Low Budget Full Independent H...
Book Paid Powai Call Girls Mumbai 𖠋 9930245274 𖠋Low Budget Full Independent H...Book Paid Powai Call Girls Mumbai 𖠋 9930245274 𖠋Low Budget Full Independent H...
Book Paid Powai Call Girls Mumbai 𖠋 9930245274 𖠋Low Budget Full Independent H...
 
Call Girls Bangalore Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Bangalore Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Bangalore Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Bangalore Just Call 9907093804 Top Class Call Girl Service Available
 
Premium Call Girls Cottonpet Whatsapp 7001035870 Independent Escort Service
Premium Call Girls Cottonpet Whatsapp 7001035870 Independent Escort ServicePremium Call Girls Cottonpet Whatsapp 7001035870 Independent Escort Service
Premium Call Girls Cottonpet Whatsapp 7001035870 Independent Escort Service
 
Call Girls Nagpur Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Nagpur Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Nagpur Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Nagpur Just Call 9907093804 Top Class Call Girl Service Available
 

DB Denormalization Presentation

  • 2. Topic: Denormalization Group Members: Sohail Haider Abdul Wahab Mehmood Akhter
  • 3. What is Denormalization Denormalization refers to a refinement to the relational schema such that the degree of normalization for a modified relation is less than the degree of at least one of the original relations. Denormalization can also be referred to a process in which we combine two relations into one new relation, and the new relation is still normalized but contains more nulls than the original relations.
  • 4. Normalization Normalization is a logical database design that is structurally consistent and has minimal redundancy. Normalization forces us to understand completely each attribute that has to be represented in the database. This may be the most important factor that contributes to the overall success of the system.
  • 5. Normalization (Continued) In addition, the following factors have to be considered: denormalization makes implementation more complex; denormalization often sacrifices flexibility; denormalization may speed up retrievals but it slows down updates.
  • 6. Then why to denormalize relations It is sometimes argued that a normalized database design does not provide maximum processing efficiency. There may be circumstances where it may be necessary to accept the loss of some of the benefits of a fully normalized design in favor of performance.
  • 7. Steps of Denormalization 1. Combining one-to-one (1:1) relationships 2. Duplicating non-key attributes in one-to-many (1:*) relationships to reduce joins 3. Duplicating foreign key attributes in one-to-many (1:*) relationships to reduce joins 4. Duplicating attributes in many-to-many (*:*) relationships to reduce joins 5. Introducing repeating groups 6. Creating extract tables 7. Partitioning relations
  • 8.
  • 9. 1. Combining one-to-one (1:1) relationships Re-examine one-to-one (1:1) relationships to determine the effects of combining the relations into a single relation. Combination should only be considered for relations that are frequently referenced together and infrequently referenced separately.
  • 10. Example Consider the 1:1 relationship between “client” and “interview”. • The Client relation contains information on potential renters of property; the Interview relation contains the date of the interview and comments made by a member of staff about a Client.
  • 11. Example (Continued) We could combine these two relations together to form a new relation ClientInterview. There may be a significant number of nulls in the combined relation ClientInterview depending on the proportion of tuples involved in the participation. If the original Client relation is large and the proportion of tuples involved in the participation is small, there will be a significant amount of wasted space.
  • 13. 2. Duplicating non-key attributes in one-to-many (1:*) relationships to reduce joins In this step we aim to reduce or remove joins from frequent or critical queries by duplicating non-key attributes in 1:* relationships.
  • 14. Example Consider the relations PropertyForRent and PrivateOwner.
  • 15. Example (Continued) Whenever the PropertyForRent relation is accessed, it is very common for the owner‟s name to be accessed at the same time. We need to write the following query everytime to access this:
  • 16. Example (Continued) By duplicating the lName attribute in the PropertyForRent relation, PrivateOwner relation can be removed from the query.
  • 17. Disadvantages of Step 2 The potential for loss of integrity is considerable. Additional time that is required to maintain consistency automatically every time a tuple is inserted, updated, or deleted. Increase in storage space resulting from the duplication.
  • 18. 3. Duplicating foreign key attributes in one-to-many (1:*) relationship to reduce joins The aim of this step is also to reduce or remove joins from frequent or critical queries, but this time by duplicating foreign key attributes in one-to-many (1:*) relationship.
  • 19. Example Again consider the relations PropertyForRent and PrivateOwner.
  • 20. Example (Continued) In order to list all the private property owners at a branch, following query will be used: SELECT o.lName FROM PropertyForRent p, PrivateOwner o WHERE p.ownerNo = o.ownerNo AND branchNo = „B003‟; The need for this join can be removed by duplicating the foreign key branchNo in the PrivateOwner relation.
  • 21. Example (Continued)This can be done by introducing a direct relationship between the Branch and PrivateOwner relations. Thus the query could be simplified to: SELECT o.lName FROM PrivateOwner o WHERE branchNo = „B003‟;
  • 23. Before: SELECT o.lName FROM PropertyForRent p, PrivateOwner o WHERE p.ownerNo = o.ownerNo AND branchNo = „B003‟; After: SELECT o.lName FROM PrivateOwner o WHERE branchNo = „B003‟;
  • 24. 4. Duplicating attributes in many- to-many (*:*) relationships to reduce joins In some circumstances, it may be possible to reduce the number of relations to be joined by duplicating attributes from one of the original entities in the intermediate relation.
  • 25. Example Consider the relations Client, PropertyForRent and Viewing.
  • 26. Example (Continued) Suppose that sales staff need to contact clients who have still to make a comment on the properties they have viewed. They need only the street attribute of the property when talking to the clients. The query for this will be:
  • 27. Example (Continued) Duplicating the street attribute in the intermediate Viewing relation can remove the PropertyForRent relation from the query, giving the query: SELECT c.*, v.street, v.viewDate FROM Client c, Viewing v WHERE c.clientNo = v.clientNo AND comment IS NULL;
  • 28. 5. Introducing repeating groups In this step repeating groups that were eliminated from the logical data model as a result of the requirement that all entities be in first normal form are re-introduced. Other than that repeating groups which were separated out into a new relation, forming a 1:* relationship with the original (parent) relation are re-combined. In general, this type of denormalization should be considered only in the following circumstances: 1. the absolute number of items in the repeating group is known. 2. the number is static and will not change over time/ 3. the number is not very large, typically not greater than 10, although this is not as important as the first two conditions.
  • 29. Example Consider Branch and Telephone relations. First both these relations are re-combined.
  • 30. Example (Continued) then telephone details in the original Branch relation, with one attribute for each telephone as follows:
  • 31. 6. Creating extract tables In this step a single, highly denormalized extract table based on the relations required by the reports. It allow the users to access the extract table directly instead of the base relations.
  • 32. Why to create extract tables This may be for situations where reports have to be run at peak times during the day. The most common technique for producing extract tables is to create and populate the tables in an overnight batch run when the system is lightly loaded.
  • 33. 7. Partitioning relations Decomposing relations into a number of smaller and more manageable pieces called partitions. This is an alternative approach that addresses the key problem with supporting very large relations (and indexes) rather than combining relations together. There are two main types of partitioning: 1. Horizontal partitioning 2. Vertical partitioning.
  • 34. Types of Partitioning Horizontal: Distributing the tuples of a relation across a number of (smaller) partitioning relations. Vertical: Distributing the attributes of a relation across a number of (smaller) partitioning relations (the primary key is duplicated to allow the original relation to be reconstructed).
  • 36. Other types of Partitioning Range: In this type each partition is defined by a range of values for one or more attributes. List In this type each partition is defined by a list of values for an attribute. Range–hash and List–hash: In this type each partition is defined by a range or a list of values and then each partition is further subdivided based on a hash function
  • 37. Example (Horizontal Partitioning) Suppose DreamHome maintains an ArchivedPropertyForRent relation with several hundreds of thousands of tuples that are held indefinitely for analysis purposes. Searching for a particular tuple at a branch could be quite time consuming. We could reduce this time by horizontally partitioning the relation, with one partition for each branch.
  • 38. Example (Continued) We can create a (hash) partition for this scenario in Oracle using the SQL statement
  • 39. Advantages of Partitioning Partitioning has a number of advantages: Improved load balancing Improved performance Increased availability Improved recovery Security
  • 40. Disadvantages of Partitioning Partitioning can also have a number of disadvantages: Complexity Reduced performance Duplication
  • 41. Implications of denormalization There are a number of implications of denormalization. Data integrity must be maintained. Common solutions for maintaining it are: Triggers: Triggers can be used to automate the updating of derived or duplicated data. Transactions: Build transactions into each application that make the updates to denormalized data as a single (atomic) action. Batch reconciliation: Run batch programs at appropriate times to make the denormalized data consistent.
  • 42. Advantages of Denormalization Denormalization can improve performance by: precomputing derived data; minimizing the need for joins; reducing the number of foreign keys in relations; reducing the number indexes (thereby saving storage space); reducing the number of relations.
  • 43. Disadvantages of DenormalizationDisadvantages of Denormalization are: May speed up retrievals but can slow down updates. Always application-specific and needs to be re-evaluated if the application changes. Can increase the size of relations. May simplify implementation in some cases but may make it more complex in others. Sacrifices flexibility.