DATA ARCHITECTURETime

Temporal & Historical Modeling

How data engineers design data that lasts — pick a topic on the left and its full breakdown loads here: the mental model, ERDs and worked schemas, trade-offs, edge cases, and the decisions that separate a durable model from a fragile one.

18 min readTopics chapter readerLevel · Dimensional & Warehouse
01 · Orientation

What You'll Master Here

valid time (when it was true in the world) and transaction time (when we recorded it). Model the ones your questions need.

4 min · Topic 1 of 10

Chapter 11 kept history for one dimension attribute. This chapter is about the thing underneath that: time is two independent clocks, not one. Valid time is when a fact was true in the world; transaction time is when your database believed it. Most "the report changed" mysteries are a confusion between them.

Climb the ladder below. Each rung adds one column pair to the same land-registry title, and the four questions beside it turn from unanswerable to answerable. It opens on rung 1 — valid time only — because that is the rung most warehouses actually ship, and rung 2 is where a confident, wrong answer appears.

Core mental model

Two clocks: valid time (when it was true in the world) and transaction time (when we recorded it). Model the ones your questions need.

Why it matters

Auditing, compliance, and any "as of" reporting depend on modeling time correctly. The difference between "what was true" and "what we knew" is invisible until a regulator or a restated number forces it, and by then the data must already support it.

valid time
When a fact was true in the real world.
transaction time
When the database recorded (or learned) the fact.
bitemporal
Tracking both valid time and transaction time together.
event sourcing
Storing an append-only log of events as the source of truth, deriving state from it.
One title, four storage designsArdenmoor title ARD-4471. Transfer to Carrick completed 12 Mar 2026, registered 2 May, rectified 8 Jul to a 1 Apr completion date. Each rung adds one column pair.
valid_from / valid_to — when it was true in the world
proprietorvalid_fromvalid_to
Bellhaven Farms2019-05-142026-04-01
Carrick Land Co2026-04-019999-12-31
What it can answer
  • Who is the registered proprietor of ARD-4471 today?YESThe open-ended row: Carrick Land Co.
  • Who owned ARD-4471 on 20 March 2026?YESBellhaven — 20 March falls inside its range. This is the rung most warehouses stop at.
  • Who did the register name when a lender searched it on 20 May 2026?NOThe table holds the best current account of the past, not the account it gave on 20 May.
  • A buyer relied on that 20 May search. Was the answer they were given right?NOThe old answer was overwritten by the rectification, so there is nothing left to check it against.
1 · + valid timeOne row per real-world change. Answers every "what was true then?" question and no "what did we say then?" question at all.
Common mistake

Treating "keeping history" as a single, vague goal. You cannot answer "what did we believe last quarter?" without distinguishing valid from transaction time.

Better habit

Distinguish when something was true from when you recorded it.

Choose a temporal pattern from the questions you must answer.

Make history queryable with explicit date ranges or event logs.

How to study this chapter

One title deed runs through it: a transfer that completed on 12 March, was registered on 2 May, and was rectified on 8 July. Every widget that names ARD-4471 is showing you the same five rows from a different angle.

Remember this

Temporal modeling distinguishes valid time (what was true) from transaction time (what we knew) and provides patterns, effective dating, bitemporal, snapshots, event sourcing, to make history queryable.