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

Object oriented database concepts
Object oriented database conceptsObject oriented database concepts
Object oriented database conceptsTemesgenthanks
 
Dbms Lec Uog 02
Dbms Lec Uog 02Dbms Lec Uog 02
Dbms Lec Uog 02smelltulip
 
Distributed design alternatives
Distributed design alternativesDistributed design alternatives
Distributed design alternativesPooja Dixit
 
Controlling User Access -Data base
Controlling User Access -Data baseControlling User Access -Data base
Controlling User Access -Data baseSalman Memon
 
Procedures and triggers in SQL
Procedures and triggers in SQLProcedures and triggers in SQL
Procedures and triggers in SQLVikash Sharma
 
1 - Introduction to PL/SQL
1 - Introduction to PL/SQL1 - Introduction to PL/SQL
1 - Introduction to PL/SQLrehaniltifat
 
Client server architecture
Client server architectureClient server architecture
Client server architectureBhargav Amin
 
Data and database administration(database)
Data and database administration(database)Data and database administration(database)
Data and database administration(database)welcometofacebook
 
Fundamentals of Database ppt ch03
Fundamentals of Database ppt ch03Fundamentals of Database ppt ch03
Fundamentals of Database ppt ch03Jotham Gadot
 
Complete dbms notes
Complete dbms notesComplete dbms notes
Complete dbms notesTanya Makkar
 
Distributed Query Processing
Distributed Query ProcessingDistributed Query Processing
Distributed Query ProcessingMythili Kannan
 
File systems versus a dbms
File systems versus a dbmsFile systems versus a dbms
File systems versus a dbmsRituBhargava7
 
Difference Program vs Process vs Thread
Difference Program vs Process vs ThreadDifference Program vs Process vs Thread
Difference Program vs Process vs Threadjeetendra mandal
 
DBMS Question bank
DBMS Question bankDBMS Question bank
DBMS Question bankSara Sahu
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLEVraj Patel
 
DDL And DML
DDL And DMLDDL And DML
DDL And DMLpnp @in
 

What's hot (20)

Object oriented database concepts
Object oriented database conceptsObject oriented database concepts
Object oriented database concepts
 
Dbms Lec Uog 02
Dbms Lec Uog 02Dbms Lec Uog 02
Dbms Lec Uog 02
 
Distributed design alternatives
Distributed design alternativesDistributed design alternatives
Distributed design alternatives
 
Controlling User Access -Data base
Controlling User Access -Data baseControlling User Access -Data base
Controlling User Access -Data base
 
Procedures and triggers in SQL
Procedures and triggers in SQLProcedures and triggers in SQL
Procedures and triggers in SQL
 
DBMS PPT
DBMS PPTDBMS PPT
DBMS PPT
 
Database Triggers
Database TriggersDatabase Triggers
Database Triggers
 
1 - Introduction to PL/SQL
1 - Introduction to PL/SQL1 - Introduction to PL/SQL
1 - Introduction to PL/SQL
 
Client server architecture
Client server architectureClient server architecture
Client server architecture
 
Data and database administration(database)
Data and database administration(database)Data and database administration(database)
Data and database administration(database)
 
Fundamentals of Database ppt ch03
Fundamentals of Database ppt ch03Fundamentals of Database ppt ch03
Fundamentals of Database ppt ch03
 
Complete dbms notes
Complete dbms notesComplete dbms notes
Complete dbms notes
 
Distributed Query Processing
Distributed Query ProcessingDistributed Query Processing
Distributed Query Processing
 
File systems versus a dbms
File systems versus a dbmsFile systems versus a dbms
File systems versus a dbms
 
Difference Program vs Process vs Thread
Difference Program vs Process vs ThreadDifference Program vs Process vs Thread
Difference Program vs Process vs Thread
 
DBMS Question bank
DBMS Question bankDBMS Question bank
DBMS Question bank
 
ch3.ppt
ch3.pptch3.ppt
ch3.ppt
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
 
Data Base Management System
Data Base Management SystemData Base Management System
Data Base Management System
 
DDL And DML
DDL And DMLDDL And DML
DDL And DML
 

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
 
Cardinality and participation constraints
Cardinality and participation constraintsCardinality and participation constraints
Cardinality and participation constraintsNikhil Deswal
 
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
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data ModelSmriti Jain
 
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 (14)

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
 
Cardinality and participation constraints
Cardinality and participation constraintsCardinality and participation constraints
Cardinality and participation constraints
 
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
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data Model
 
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
 

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
 
Data models
Data modelsData models
Data models
 
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
 

Recently uploaded

VIP Mumbai Call Girls Hiranandani Gardens Just Call 9920874524 with A/C Room ...
VIP Mumbai Call Girls Hiranandani Gardens Just Call 9920874524 with A/C Room ...VIP Mumbai Call Girls Hiranandani Gardens Just Call 9920874524 with A/C Room ...
VIP Mumbai Call Girls Hiranandani Gardens Just Call 9920874524 with A/C Room ...Garima Khatri
 
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 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
 
(👑VVIP ISHAAN ) Russian Call Girls Service Navi Mumbai🖕9920874524🖕Independent...
(👑VVIP ISHAAN ) Russian Call Girls Service Navi Mumbai🖕9920874524🖕Independent...(👑VVIP ISHAAN ) Russian Call Girls Service Navi Mumbai🖕9920874524🖕Independent...
(👑VVIP ISHAAN ) Russian Call Girls Service Navi Mumbai🖕9920874524🖕Independent...Taniya Sharma
 
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
 
♛VVIP Hyderabad Call Girls Chintalkunta🖕7001035870🖕Riya Kappor Top Call Girl ...
♛VVIP Hyderabad Call Girls Chintalkunta🖕7001035870🖕Riya Kappor Top Call Girl ...♛VVIP Hyderabad Call Girls Chintalkunta🖕7001035870🖕Riya Kappor Top Call Girl ...
♛VVIP Hyderabad Call Girls Chintalkunta🖕7001035870🖕Riya Kappor Top 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
 
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
 
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
 
VIP Service Call Girls Sindhi Colony 📳 7877925207 For 18+ VIP Call Girl At Th...
VIP Service Call Girls Sindhi Colony 📳 7877925207 For 18+ VIP Call Girl At Th...VIP Service Call Girls Sindhi Colony 📳 7877925207 For 18+ VIP Call Girl At Th...
VIP Service Call Girls Sindhi Colony 📳 7877925207 For 18+ VIP Call Girl At Th...jageshsingh5554
 
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
 
Bangalore Call Girl Whatsapp Number 100% Complete Your Sexual Needs
Bangalore Call Girl Whatsapp Number 100% Complete Your Sexual NeedsBangalore Call Girl Whatsapp Number 100% Complete Your Sexual Needs
Bangalore Call Girl Whatsapp Number 100% Complete Your Sexual NeedsGfnyt
 
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
 
Call Girls Ooty Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Ooty Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Ooty Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Ooty Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
Call Girls Horamavu WhatsApp Number 7001035870 Meeting With Bangalore Escorts
Call Girls Horamavu WhatsApp Number 7001035870 Meeting With Bangalore EscortsCall Girls Horamavu WhatsApp Number 7001035870 Meeting With Bangalore Escorts
Call Girls Horamavu WhatsApp Number 7001035870 Meeting With Bangalore Escortsvidya singh
 
Call Girls Service Jaipur Grishma WhatsApp ❤8445551418 VIP Call Girls Jaipur
Call Girls Service Jaipur Grishma WhatsApp ❤8445551418 VIP Call Girls JaipurCall Girls Service Jaipur Grishma WhatsApp ❤8445551418 VIP Call Girls Jaipur
Call Girls Service Jaipur Grishma WhatsApp ❤8445551418 VIP Call Girls Jaipurparulsinha
 
Call Girls Colaba Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls Colaba Mumbai ❤️ 9920874524 👈 Cash on DeliveryCall Girls Colaba Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls Colaba Mumbai ❤️ 9920874524 👈 Cash on Deliverynehamumbai
 
💎VVIP Kolkata Call Girls Parganas🩱7001035870🩱Independent Girl ( Ac Rooms Avai...
💎VVIP Kolkata Call Girls Parganas🩱7001035870🩱Independent Girl ( Ac Rooms Avai...💎VVIP Kolkata Call Girls Parganas🩱7001035870🩱Independent Girl ( Ac Rooms Avai...
💎VVIP Kolkata Call Girls Parganas🩱7001035870🩱Independent Girl ( Ac Rooms Avai...Taniya Sharma
 

Recently uploaded (20)

VIP Mumbai Call Girls Hiranandani Gardens Just Call 9920874524 with A/C Room ...
VIP Mumbai Call Girls Hiranandani Gardens Just Call 9920874524 with A/C Room ...VIP Mumbai Call Girls Hiranandani Gardens Just Call 9920874524 with A/C Room ...
VIP Mumbai Call Girls Hiranandani Gardens Just Call 9920874524 with A/C Room ...
 
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 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...
 
Russian Call Girls in Delhi Tanvi ➡️ 9711199012 💋📞 Independent Escort Service...
Russian Call Girls in Delhi Tanvi ➡️ 9711199012 💋📞 Independent Escort Service...Russian Call Girls in Delhi Tanvi ➡️ 9711199012 💋📞 Independent Escort Service...
Russian Call Girls in Delhi Tanvi ➡️ 9711199012 💋📞 Independent Escort Service...
 
(👑VVIP ISHAAN ) Russian Call Girls Service Navi Mumbai🖕9920874524🖕Independent...
(👑VVIP ISHAAN ) Russian Call Girls Service Navi Mumbai🖕9920874524🖕Independent...(👑VVIP ISHAAN ) Russian Call Girls Service Navi Mumbai🖕9920874524🖕Independent...
(👑VVIP ISHAAN ) Russian Call Girls Service Navi Mumbai🖕9920874524🖕Independent...
 
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
 
♛VVIP Hyderabad Call Girls Chintalkunta🖕7001035870🖕Riya Kappor Top Call Girl ...
♛VVIP Hyderabad Call Girls Chintalkunta🖕7001035870🖕Riya Kappor Top Call Girl ...♛VVIP Hyderabad Call Girls Chintalkunta🖕7001035870🖕Riya Kappor Top Call Girl ...
♛VVIP Hyderabad Call Girls Chintalkunta🖕7001035870🖕Riya Kappor Top 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
 
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...
 
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
 
VIP Service Call Girls Sindhi Colony 📳 7877925207 For 18+ VIP Call Girl At Th...
VIP Service Call Girls Sindhi Colony 📳 7877925207 For 18+ VIP Call Girl At Th...VIP Service Call Girls Sindhi Colony 📳 7877925207 For 18+ VIP Call Girl At Th...
VIP Service Call Girls Sindhi Colony 📳 7877925207 For 18+ VIP Call Girl At Th...
 
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
 
Bangalore Call Girl Whatsapp Number 100% Complete Your Sexual Needs
Bangalore Call Girl Whatsapp Number 100% Complete Your Sexual NeedsBangalore Call Girl Whatsapp Number 100% Complete Your Sexual Needs
Bangalore Call Girl Whatsapp Number 100% Complete Your Sexual Needs
 
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
 
Call Girls Ooty Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Ooty Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Ooty Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Ooty Just Call 9907093804 Top Class Call Girl Service Available
 
Call Girls Horamavu WhatsApp Number 7001035870 Meeting With Bangalore Escorts
Call Girls Horamavu WhatsApp Number 7001035870 Meeting With Bangalore EscortsCall Girls Horamavu WhatsApp Number 7001035870 Meeting With Bangalore Escorts
Call Girls Horamavu WhatsApp Number 7001035870 Meeting With Bangalore Escorts
 
Call Girls Service Jaipur Grishma WhatsApp ❤8445551418 VIP Call Girls Jaipur
Call Girls Service Jaipur Grishma WhatsApp ❤8445551418 VIP Call Girls JaipurCall Girls Service Jaipur Grishma WhatsApp ❤8445551418 VIP Call Girls Jaipur
Call Girls Service Jaipur Grishma WhatsApp ❤8445551418 VIP Call Girls Jaipur
 
Call Girls Colaba Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls Colaba Mumbai ❤️ 9920874524 👈 Cash on DeliveryCall Girls Colaba Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls Colaba Mumbai ❤️ 9920874524 👈 Cash on Delivery
 
💎VVIP Kolkata Call Girls Parganas🩱7001035870🩱Independent Girl ( Ac Rooms Avai...
💎VVIP Kolkata Call Girls Parganas🩱7001035870🩱Independent Girl ( Ac Rooms Avai...💎VVIP Kolkata Call Girls Parganas🩱7001035870🩱Independent Girl ( Ac Rooms Avai...
💎VVIP Kolkata Call Girls Parganas🩱7001035870🩱Independent Girl ( Ac Rooms Avai...
 

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.