A3.2.7
Evaluate the need for denormalizing databases
Denormalization means intentionally adding some redundancy back into a database. It is usually done to improve performance.
- Denormalization means intentionally adding some redundancy back into a database.
- It is usually done to improve performance.
Advantages
- simpler queries (less SQL
JOINto execute, so faster) - fewer joins
- faster data retrieval
- useful for reporting systems and read-heavy systems
Disadvantages
- more duplicated data
- harder updates and inserts
- higher risk of inconsistency
- more storage required
When denormalization may be needed
- when performance is more important than strict normalization
- when complex joins are too slow
- when the database is mostly read rather than frequently updated
Evaluation
- Normalization is usually the best starting point because it:
- reduces redundancy
- improves integrity
- avoids anomalies
- Denormalization may be justified when:
- the system has performance bottlenecks
- read speed matters more than update simplicity