Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Denormalization
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Implementation == A [[Database normalization|normalized]] design will often "store" different but related pieces of information in separate logical tables (called relations). If these relations are stored physically as separate disk files, completing a database [[Information retrieval|query]] that draws information from several relations (a ''[[Join (SQL)|join operation]]'') can be slow. If many relations are joined, it may be prohibitively slow. There are two strategies for dealing with this by denormalization: * "DBMS support": The database management system stores redundant copies in the background, which are kept consistent by the DBMS software * "DBA implementation": The database administrator (or designer) design around the problem by denormalizing the logical data design === DBMS support === With this approach, database administrators can keep the logical design normalized, but allow the [[database management system]] (DBMS) to store additional redundant information on disk to optimize query response. In this case it is the DBMS software's responsibility to ensure that any redundant copies are kept consistent. This method is often implemented in [[SQL]] as indexed views ([[Microsoft SQL Server]]) or [[materialized view]]s ([[Oracle Database|Oracle]], [[PostgreSQL]]). A view may, among other factors, represent information in a format convenient for querying, and the index ensures that queries against the view are optimized physically. === DBA implementation === With this approach, a database administrator or designer has to denormalize the logical data design. With care this can achieve a similar improvement in query response, but at a cost β it is now the database designer's responsibility to ensure that the denormalized database does not become inconsistent. This is done by creating rules in the database called ''[[Constraint satisfaction|constraints]]'', that specify how the redundant copies of information must be kept synchronized, which may easily make the de-normalization procedure pointless. It is the increase in logical [[Complexity of constraint satisfaction|complexity]] of the database design and the added complexity of the additional constraints that make this approach hazardous. Moreover, constraints introduce a [[trade-off]], speeding up reads (<code>SELECT</code> in SQL) while slowing down writes (<code>INSERT</code>, <code>UPDATE</code>, and <code>DELETE</code>). This means a denormalized database under heavy write load may offer ''worse'' performance than its functionally equivalent normalized counterpart.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)