Skip to content
← All insights
NoSQL5 min read

Choosing NoSQL does not remove the need for a data model

A flexible store changes the modelling trade-offs. It does not make those trade-offs disappear.

Start with access patterns

NoSQL design works best when the important reads, writes and consistency needs are understood first. Choosing the database before those patterns are clear often pushes complexity into application code.

Flexibility still needs discipline

Flexible documents can help a system evolve, but mixed shapes and unclear versioning rules make production behaviour difficult to reason about. Decide which flexibility is useful and which invariants still need protection.

  • List the busiest access patterns
  • State consistency requirements
  • Plan document versioning and migrations
  • Account for indexes and operational tooling
A MongoDB document should reveal ownership and shapejavascript / MongoDB
{
  _id: ObjectId('...'),
  customerId: 'customer-42',
  status: 'paid',
  items: [
    { sku: 'book-1', quantity: 2 }
  ],
  schemaVersion: 2
}

db.orders.createIndex({ customerId: 1, createdAt: -1 })