← Back to Pattern Catalog
Foundation Pattern

State Modeling

State Modeling represents the changing state of a business entity over valid-time intervals.

Problem

Business entities change over time, but reports need the correct state at a specific date.

Many business entities do not just have one current value. Their status, attributes or relationships change over time.

A customer changes segment. A contract changes status. A product changes category. State Modeling captures these changes as valid intervals so reports can answer what was true at a reporting date.

Current-state leakageOverlapping statesMissing coverageAmbiguous point-in-time results
Example

Contract C1 has different states for different valid-time periods.

May report
Active
Valid: Jan – Jun
August report
Cancelled
Valid: Jul – Dec
Point-in-time result

A report for May should show the contract as Active. A report for August should show it as Cancelled.

Why it happens

Current values are not enough for historical reporting.

Operational systems often optimize for the latest state. Historical reporting needs previous states as well, with clear start and end boundaries.

Once users ask “what was true on this date?”, the model needs explicit valid-time intervals.

Changing attributesStatus transitionsSCD2 dimensionsValid-time intervalsPoint-in-time reporting
Common modeling approaches

Store one row per entity state version.

Valid-time intervals
Use valid_from and valid_to to describe when each state version is true in the business.
One active state
Validate that each entity resolves to one intended state for a reporting date.
Boundary convention
Define interval semantics explicitly. Historical models should use one consistent interpretation of valid_from and valid_to across all entities and joins.
Correction tracking
Use bitemporal modeling when historical states can be corrected or delivered late.
Validation checks

Validate that point-in-time state resolution is unambiguous.

Detect valid-time overlapsDetect valid-time gapsValidate current-state uniquenessCheck point-in-time state resolutionValidate interval boundary conventions
Why it matters

State Modeling is the foundation for most historical reporting models.

Without explicit state intervals, downstream reports often fall back to current values and lose historical correctness.

Once state is modeled correctly, it can be joined, completed, conformed and validated across the rest of the historical model.

Related Patterns
Bitemporal ModelingState ↔ State AlignmentHistorical OverlapHistorical Coverage GapDimension Completion
Try it

Validate state intervals in the Workbench.

Use the Historical Modeling Workbench to reason about valid-time gaps, overlaps, point-in-time joins and historical state resolution.

Open Historical Modeling Workbench →