Upload
kamalshrish
View
215
Download
0
Embed Size (px)
Citation preview
8/18/2019 Finaldenormalization - Copy
1/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 theoriginal relations.
Normalization
Normalization is a logical database design that is structurally consistent and has minimalredundancy. 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.
In addition, the following factors have to be considered: denormalization maes implementationmore comple!" denormalization often sacrifices fle!ibility" 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 ma!imum processing
efficiency. There may be circumstances where it may be necessary to accept the loss of some ofthe benefits of a fully normalized design in favor of performance.
Benefts o Normalization
Normalization produces smaller tables with smaller rows:
#ore rows per page $less logical I%&'
#ore rows per I%& $more efficient'
#ore rows fit in cache $less physical I%&'
The benefits of normalization include:
(earching, sorting, and creating inde!es are faster, since tables are narrower, and more
rows fit on a data page.
)ou usually wind up with more tables. )ou can have more clustered inde!es $you get
only one per table' so you get more fle!ibility in tuning *ueries.
Inde! searching is often faster, since inde!es tend to be narrower and shorter.
#ore tables allow better use of segments to control physical placement of data.
8/18/2019 Finaldenormalization - Copy
2/3
)ou usually wind up with fewer inde!es per table, so data modification commands are
faster.
)ou wind up with fewer null values and less redundant data, maing your database more
compact.
Triggers e!ecute more *uicly if you are not maintaining redundant data.
Data modification anomalies are reduced.
Normalization is conceptually cleaner and easier to maintain and change as your needs
change.
+ood reasons for denormalizing are:
ll or nearly all of the most fre*uent *ueries re*uire access to the full set of -oined data
ma-ority of applications perform table scans when -oining tables
omputational comple!ity of derived columns re*uires temporary tables or e!cessively
comple! *ueries
Disadvantages o Denormalization
Denormalization has these disadvantages:
It usually speeds retrieval but can slow data modification.
It is always application/specific and needs to be re/evaluated if the application changes.
It can increase the size of tables.
In some instances, it simplifies coding" in others, it maes coding more comple!.
Perormance Advantages o Denormalization
Denormalization can improve performance by:
#inimizing the need for -oins
0educing the number of foreign eys on tables
8/18/2019 Finaldenormalization - Copy
3/3
0educing the number of inde!es, saving storage space and reducing data modification
time
1recomputing aggregate values, that is, computing them at data modification time rather
than at select time
0educing the number of tables $in some cases'