DEV Community

Marriane Akeyo
Marriane Akeyo

Posted on

Denormaliztion ,its pros and cons

Denormalization can be defined as an optimization technique used to make queries more efficient by reducing the number of costly joins necessary to retrieve data.In short we decide to be okey with redundancy unlike in normalization,where no data redundancy is allowed.Instead each table contains its own data and only joins are used to link on data with the other.

Pros of denormalization

  1. Queries are executed much more faster.
    This is because we fetch data from one table instead of joining numerous tables to find the data we need.

  2. Writing queries becomes much more faster.
    Since there is no need to search for joining keys to fetch our data.However , one should always remember to update the tables accordingly once each update is made.

Cons of denormalization

  1. Perfoming updates and insert queries becomes more expensive and even harder to write.
    This is due to the increase in data processing as a result of data redundancy and possible data duplication.

  2. Increase in table size
    This demands an large storage space for the table.

  3. Data may be inconsistent
    A failure to update the required tables might lead to inconsistent data which might be expensive to debug.

Thanks for reading this short post ....i hope this gives you some insight.

Top comments (0)