Saturday, 5 September 2015

Normalization vs Denormalization

Normalization:

PROS:
  • When writes are more than reads
  • Vertically divided among columns i.e. split-ted into multiple tables.
  • Updates and Inserts will be effective since no duplicates.
  • Less use of heavy DISTINCT or GROUP BY queries since no duplicates.

CONS:
  • JOINS due to multiple tables.
  • Index strategies are not effective due to joins.

De-Normalization:

PROS:
  • When reads are more than writes.
  • SELECTS are very fast since we avoid JOINS and effective because of index strategies works very well with selective columns.

CONS:
  • Updates and INSERTS becomes costly.

In real time , you should be good enough to choose the most read or most write tables to apply this concepts.






No comments:

Post a Comment