Mini-dimensions
Move rapidly changing price-band attributes out of a stable product dimension into a mini-dimension referenced at event time.
Concept
slowly-changing-dimensions
The primary modeling idea this problem reinforces.
Requirements
3
Business needs the model must satisfy.
A product dimension mixes stable attributes (name, SKU) with rapidly changing ones (price band, availability tier). Type 2 versioning the whole product dimension would explode its row count. Analysts still need the band as it was at each sale.
A mini-dimension isolates rapidly changing, low-cardinality attributes so they version independently of the stable dimension. The fact references both, capturing the band at event time without row explosion.
- Keep the stable product attributes in the product dimension.
- Create a mini-dimension for the volatile price-band and availability attributes.
- Add a sales fact with surrogate foreign keys to both the product dimension and the mini-dimension.
Template
Mini-dimension starter
The model users start from in the full workspace.
Entities
1
Seeded tables visible in the public preview.
Dialect
postgresql
Generated SQL target for this starter model.
This preview is read-only. Open the workspace to edit and verify; saving needs a free account.
Open workspaceTry the question first.
The discussion has other people's approaches and solutions. Give it a real attempt before you read them.