The Hidden Geometry of Data Models
8/13/2025
data · modeling · databases
TL;DR
Data has shape. Preserve invariants while evolving schemas.
Moves
- Normalize where correctness matters; denormalize at edges.
- Schema diffusion control: one place owns canonical facts.
- Bitemporal patterns: valid-time vs. system-time.
Example: contract test for data shape
expect(order.total).toEqual(sum(order.items.map(i => i.qty * i.price)));
Checklist
- What invariants must always hold?
- Where is data duplicated and why?
- How is history represented and queried?