Skip to content
← Back to challenges
Dimensional Modeling FoundationsQuick Decisionbeginner5 min

Choose the right SCD pattern for price history

Pick the dimension strategy that preserves historical product prices for downstream revenue analysis.

How this preview works
Preview this problem before signing in. Sign in to save progress and submit work.

Concept

slowly-changing-dimensions

The primary modeling idea this problem reinforces.

Objectives

2

Concrete things this problem is meant to teach.

Scenario

A merchandising team changes product prices each quarter. Analysts need to report historical revenue using the price customers actually paid at the time of purchase.

Why this matters

This is one of the first places dimensional modeling either preserves truth or quietly destroys it. If you choose the wrong change-tracking pattern, every downstream revenue trend becomes harder to trust.

Requirements
  • Preserve historical prices for each product.
  • Keep fact rows analyzable against the price that was valid at order time.
What success looks like
  • Choose the option that preserves historical attribute versions instead of overwriting them.
  • Be able to explain how analysts would recover the price that was valid when the order happened.
Hints
  • Ask whether the old attribute value must remain queryable later.
Common pitfalls
  • Choosing the current-state overwrite pattern because it looks simpler operationally.
  • Assuming fact tables alone can recover historical dimensional context without explicit versioning.
Reference approaches
These are valid approaches, not one absolute answer.

Use a Type 2 product dimension

Following Kimball Type 2 slowly changing dimension guidance, track price changes as new dimension rows with effective date ranges.

Optimizes for

  • Historical accuracy
  • Clean star-schema joins

Trade-offs

  • More rows in the dimension
  • Needs date-validity logic