Design around access patterns, not just object models
coreintermediateModeling 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.
Think of it as
An object model is like drawing a family tree — it shows who relates to whom, cleanly. But designing a library's shelving system from the family tree alone would be a mistake: what matters for shelving is how people actually search (by author? by subject?), not the family relationships between authors. A data model needs the same shift — from "what things exist and how do they relate" to "how will this actually be looked up."
What we're doing: Show two systems with an identical object model needing different schemas because their access patterns differ.
- 6
- System A never needs to answer "all posts by author X, ordered by time" at volume — its schema can stay simple.
- 11
- System B's dominant query is exactly that — its schema has to be built around answering it fast, not around the object model alone.
Why this works: The object model was identical in both systems — the schema that actually works is decided by how the data gets read and written in production, which the object model alone never tells you.
Designing a schema purely from the object model, then discovering the real access pattern in production
Wrong
Better
What you see: A schema that looked complete in review turns out to need a full redesign once the real production query pattern — usually the highest-volume one — shows up, because nothing about the object model predicted it.
Why: An object model describes structure; it says nothing about frequency or shape of access. The schema that survives production is the one designed around the actual dominant queries, with the object model as only one input to that design.
- 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
Object model vs access-pattern-driven model
Together
Remember: An 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.
See also: entities and identifiers · choosing a data model

