Data Modeling Best Practices

Chapter 2 · Practice 1 of 4

Pick the fact table type that matches the process

From Fact tables

Why it matters

Microsoft's guidance describes three types of fact table:

TypeOne row perExampleUpdated?
TransactionEventEach order lineNever, except to fix errors
Periodic snapshotEntity per periodStock level per product at end of dayNew rows each period
Accumulating snapshotProcess instanceAn order moving through placed, paid, shipped, deliveredSame row updated at each milestone

Accumulating snapshots carry several date keys, one per milestone, and their measures are usually durations between milestones, such as days from payment to shipping. If you find yourself writing complicated self-joins over an events table to measure a workflow, an accumulating snapshot is probably the missing model.