1.Design around access patterns, not just object models
Modeling data by asking "what objects exist" (a User, an Order, a Product) is only half the job. The other half — often the more important half at scale — is asking how that data will actually be queried, updated and how long it lives, because those access patterns decide the actual schema, not the object model alone.
Key features
- Object model answers: what entities exist and how do they relate
- Access pattern answers: how will this data be read and written, and how often, in production
- Invariants: rules that must always hold (an order total must match its line items) — the model must make violating them hard
- Lifecycle: how long data lives, whether it is ever deleted, archived or must be retained
- Two systems with an identical object model can need very different schemas if their access patterns differ
Object model vs access-pattern-driven model
- System A: a blog
- Posts read by permalink, individually
- Simple table keyed by id is enough
- likeCount can be a plain counter
- System B: a social feed
- "All posts from people I follow", high volume
- Needs a composite index on (authorId, createdAt)
- likeCount needs a different storage strategy
Command
object model: entities + relationships
access pattern: how each entity is actually read/written, how often, how long it livesAn object model says what exists; an access pattern says how it is actually read and written in production — the schema that survives is designed around the second, using the first as one input, not the other way around.