By adding redundant data to one or more tables, denormalization is a database optimization approach. In a relational database, this can help us avoid expensive joins. Denormalization does not imply “reversing normalization” or “not to normalize,” as some may believe. It is an optimization method used following normalization.

Denormalization, in its simplest form, is the process of taking a normalized schema and rendering it non-normalized. Developers use it to optimize the efficiency of systems to handle time-critical processes.

Denormalization can take different forms:

  • You can avoid using queries using JOIN by joining rows from many tables.
  • You can avoid using queries with GROUP BY by performing aggregate calculations with SUM(), COUNT(), MAX(), and other functions.
  • To avoid using select-list queries with complicated phrases, perform expensive calculations in advance.

Denormalization addresses the basic problem that read and join operations in databases are slow. The advantages and disadvantages of denormalization are as follows:

Advantages of denormalization

  • We perform fewer joins, which speeds up data retrieval.
  • Since we need to look at fewer tables, retrieval queries may be simpler (and therefore less likely to include problems).

Drawbacks to denormalization

  • Insertions and updates are expensive.
  • Difficult to write updates and inserts
  • Data may not be accurate.
  • More storage is required because of data redundancy.

Hope you find this article helpful.

One comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s