An entity, an event, a snapshot and a historical version have different grains. Declare that meaning and the relationship rules before choosing keys, joins or storage. Transaction scope then determines which invariants survive concurrent changes.
In this chapter
- Data models, keys and relationship cardinalityRelational, document, key-value, wide-column and graph representations with explicit keys.
- Dimensional modelling, star schemas and fact grainStar and snowflake schemas, facts, additivity and bridge allocation.
- Slowly changing dimensions and temporal historyTypes 0–7, time boundaries, late changes and history growth.
- ACID, transactional workloads and cross-system consistencyOLTP/OLAP/HTAP, isolation, distributed effects, outbox and publication.
- One Big Table, dimensional models and ML training grainChoose wide representations and versioned training inputs.