Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

De-normalize live data for the sake of reports - Good or Bad?

What are the pros/cons of de-normalizing an enterprise application database because it will make writing reports easier?

Pro - designing reports in SSRS will probably be "easier" since no joins will be necessary.

Con - developing/maintaining the app to handle de-normalized data will become more difficult due to duplication of data and synchronization.

Others?

like image 805
Travis Heseman Avatar asked Nov 20 '09 18:11

Travis Heseman


People also ask

Is it good to normalize data?

One of the biggest impacts of normalizing your data is reducing the number of duplicates in your database. Duplicate contact and account records can create a range of problems in your database, including misrouted leads and misaligned teams. Normalizing your data is the first step in a quality data management workflow.

What is a disadvantage of normalizing data?

There are a few drawbacks in normalization : Creating a longer task, because there are more tables to join, the need to join those tables increases and the task become more tedious (longer and slower). The database become harder to realize as well.

Why is unnormalized data problem?

A poorly normalized database and poorly normalized tables can cause problems ranging from excessive disk I/O and subsequent poor system performance to inaccurate data. An improperly normalized condition can result in extensive data redundancy, which puts a burden on all programs that modify the data.


2 Answers

Denormalization for the sake of reports is Bad, m'kay.

Creating views, or a denormalized data warehouse is good.

Views have solved most of my reporting related needs. Data warehouses are great when users will be generating reports almost constantly or when your views start to slow down.

This is why you want to normalize your database

  1. To free the collection of relations from undesirable insertion, update and deletion dependencies;
  2. To reduce the need for restructuring the collection of relations as new types of data are introduced, and thus increase the life span of application programs;
  3. To make the relational model more informative to users;
  4. To make the collection of relations neutral to the query statistics, where these statistics are liable to change as time goes by.

—E.F. Codd, "Further Normalization of the Data Base Relational Model" via wikipedia

like image 66
Bob Avatar answered Sep 28 '22 13:09

Bob


The only time you should consider de-normaliozation is when the time it takes the report to generate is not acceptable. De-normalization will cause consistentcy issues that are sometimes impossible to determine especially in large datasets

like image 22
ennuikiller Avatar answered Sep 28 '22 13:09

ennuikiller