A3.2.7 · Database design
Evaluating the need for denormalizing databases
A live banking system and a weather-analytics dashboard both store data, but the right amount of normalization for one is close to wrong for the other, this statement is about weighing that decision, not just knowing the definitions.
Explainer
A3.2.5 and A3.2.6 both pushed in one direction: normalize, remove redundancy, split tables apart. This statement asks the opposite question on purpose: when is a fully normalized design actually the WRONG choice? "Evaluate" means weighing both sides and reaching a judgement, not just listing pros and cons.
Denormalization is doing A3.2.5 and A3.2.6 in reverse, on purpose. The redundancy those statements taught you to remove gets deliberately reintroduced, not because someone made a mistake, but because a specific query pattern will run faster with the duplicate right there than it would having to fetch it fresh from another table every time.
The trade-off, both sides
Real example: a banking system processing live transfers, every balance must always be exactly correct, right now, for every user checking it.
Advantages
- Minimizes data redundancy (each fact stored once, less storage, no risk of two copies disagreeing)
- Ensures data integrity (insert, update and delete rules stay consistent and enforceable)
- Supports scalability (new data added without restructuring what already exists)
Disadvantages
- More complex schema (many small tables and relationships are harder to understand and maintain)
- Slower reads (queries need joins across several tables, which costs performance)
Real example: a weather-analytics dashboard generating historical reports, the data was recorded once and never changes again, it only ever gets read.
Advantages
- Improved query performance (a value already sitting in the row you need beats fetching it through a join, every time)
- Simplified data retrieval (the table's shape ends up matching what the application actually asks for, instead of forcing it to reassemble the answer from several places)
- Enhanced scalability for reads (more read traffic doesn't mean more relationships to chase, because there are fewer of them to begin with)
Disadvantages
- Data redundancy (the same fact stored more than once, at real storage cost)
- Update risk (if an update misses one of the duplicate copies, the data quietly disagrees with itself)
Where denormalization specifically pays off
Read-intensive situations
- Read-intensive applications: when a system spends nearly all its time being queried and almost none being written to, every join it can skip is time saved on every single request.
- Reporting and analytics: a report that has to sweep across a large dataset already does a lot of work, dragging several tables together for every row of it just adds more.
- Data warehousing: once data has been pulled in from several source systems for analysis, keeping it pre-combined means a cross-source question doesn't have to redo that combining on every query.
Finding the actual balance
Denormalization trades a straightforward, fast-to-write query structure against the real risk of redundant data drifting out of sync. Reaching a genuine evaluation, not just a guess, means working through this in order:
Work out what the system spends most of its time doing: answering read requests, or absorbing a steady stream of updates? Everything else in this process depends on getting this one honestly.
Put the speed gain and the inconsistency risk on the same scale: does one genuinely outweigh the other for this specific system? The honest answer is rarely all-or-nothing, denormalizing just the handful of fields that actually get hammered by reads, while leaving the rest properly normalized, is often exactly right.
Decide, before going ahead, how the risk from step 2 actually gets managed: what checks catch a value going out of sync, who is watching whether the performance win is holding up over time, and what the actual procedure is for updating every duplicate copy together instead of just one.
Worked example
Same three questions, two systems, two different verdicts
Both databases store real, useful data. Walking through the same balancing questions gives each one a genuinely different answer, that's what "evaluate" actually looks like in practice.
Weather-analytics dashboard
Historical weather readings from hundreds of stations, joined against station and region details, to generate charts and reports. Data is recorded once and essentially never edited again.
The performance win is large and the redundancy risk is genuinely low here, a clear case for a flattened, read-optimized design.
Live ticket-booking system
A theatre's seat-booking system, where every seat's availability must update instantly and correctly the moment it's booked or released, for every user viewing the seating map at once.
The redundancy risk (double-booked seats) outweighs a performance gain the system doesn't actually need here.
Check your understanding
Which system is the stronger candidate for denormalization?
Common mistake
A3.2.7RecurringThe command term "evaluate" means weighing both sides and reaching a justified judgement. Candidates often answer with only one side, either listing denormalization's benefits with no mention of the redundancy risk, or the reverse, when the actual mark scheme rewards a genuine balance, tied to the specific scenario given.
What a weak answer looks like: "Denormalizing the reporting database would make queries faster." True, but one-sided, no mention of the redundancy risk being weighed against that benefit, and no judgement reached.
What it should say: "Denormalizing would make the reporting queries faster by removing joins, and since this data is read-only once recorded, the usual redundancy risk barely applies here, so the performance benefit clearly outweighs the cost in this specific case." States both sides AND reaches a justified verdict.
Revision questions
Past-paper style. Write an answer, then reveal the marking points and mark yourself.
[2]The weather-analytics dashboard stores each station’s name alongside every reading. Identify two problems this repetition could cause.
Marking points
评分要点
- Update anomalies: if a station is renamed, every one of its reading rows must be changed or the data disagrees.
- Wasted storage and slower writes from repeating the station name on every reading.
- 更新异常:如果某站点改名,它的每一条读数行都必须修改,否则数据自相矛盾。
- 在每条读数上重复站点名称会浪费存储并拖慢写入。
[3]Explain why the live banking system is kept fully normalized, referring to two specific characteristics of a normalized design.
Marking points
评分要点
- Balances and transfers change constantly, so an update anomaly from redundant data would produce a wrong balance.
- Normalization stores each fact once, so there is only one place to update and no risk of copies disagreeing.
- Enforced integrity through keys and constraints matters more here than any read-speed gain.
- 余额和转账不断变化,所以冗余数据引起的更新异常会产生错误的余额。
- 规范化让每个事实只存一次,因此只有一处需要更新,不会出现副本互相矛盾。
- 在这里,通过键和约束强制的完整性比任何读取速度提升都更重要。
[6]A national census database stores historical population records that are published once and never edited afterward, but are queried constantly for public statistics. Evaluate the need for denormalizing this database.
Marking points
评分要点
- The data is written once and never edited, so the main danger of denormalization, update anomalies, barely applies.
- It is queried constantly for public statistics, so avoiding joins would make those reads faster and simpler.
- Denormalizing costs extra storage, but storage is cheap compared with the query load here.
- The historical records are effectively read-only, similar to a data warehouse, which is the classic case for denormalization.
- Judgement: denormalizing this database is justified; a fully normalized live system would not be.
- A middle path is to keep a normalized master and build denormalized reporting tables or materialized views from it.
- 数据只写一次、从不修改,所以反规范化的主要危险即更新异常几乎不适用。
- 它为公共统计而被不断查询,所以避免连接会让那些读取更快更简单。
- 反规范化要多花存储,但相比这里的查询负载,存储是便宜的。
- 这些历史记录实际上是只读的,类似数据仓库,而那正是反规范化的经典场景。
- 判断:对这个数据库反规范化是合理的;而一个完全规范化的在线系统则不会这样做。
- 折中方案是保留一个规范化的主库,并从中构建反规范化的报表表或物化视图。
Flashcards
Active recall for this statement's key terms.
Keep this statement's practice with you
Free account: unlock every revision question and flashcard for A3.2.7, and every other IB CS 2027 statement.