Core capability

Database Design

Choosing and designing databases for scalability, performance, and data integrity.

3-7 daysTypical timeline
$1,000 - $3,000Typical range
4Approaches compared

SCOPE DECISION

Does this belong
in the first release?

A capability is only essential when the product promise depends on it. Use these signals to keep the decision tied to user value.

INCLUDE WHEN

The product needs it now

  • 01
    Any application storing persistent data
  • 02
    User accounts and profiles
  • 03
    Transactional data
  • 04
    Content management
LEAVE OUT WHEN

The release works without it

  • 01
    Static websites only
  • 02
    Purely frontend applications

IMPLEMENTATION OPTIONS

Choose the approach
that fits the product.

The right technology depends on ownership, scale, integration depth, and how much operational responsibility the team wants to carry.

PostgreSQLAdvanced open-source relational database

Strengths
  • ACID compliant
  • Rich features
  • JSON support
  • Excellent ecosystem
Tradeoffs
  • More complex setup
  • Requires schema design
  • Horizontal scaling harder

MongoDBPopular document database

Strengths
  • Flexible schema
  • Easy to start
  • Good for nested data
  • Scales horizontally
Tradeoffs
  • No ACID transactions (limited)
  • Data duplication
  • Less data integrity

SupabaseHosted PostgreSQL with extras

Strengths
  • Managed PostgreSQL
  • Built-in auth
  • Realtime subscriptions
  • Free tier
Tradeoffs
  • Vendor lock-in risk
  • Less control
  • Pricing at scale

PlanetScaleServerless MySQL platform

Strengths
  • Serverless scaling
  • Branch-based workflows
  • No connection limits
Tradeoffs
  • No foreign keys
  • MySQL only
  • Pricing

DELIVERY SEQUENCE

A practical path
through the work.

  • 01Analyze data requirements and relationships
  • 02Choose database type (SQL vs NoSQL)
  • 03Design initial schema/models
  • 04Set up development and production databases
  • 05Implement migrations workflow
  • 06Add indexes for common queries
  • 07Configure backups
  • 08Set up monitoring

WATCH FOR

Common implementation mistakes.

  • 01
    Not planning for schema changes (migrations)
  • 02
    Missing indexes on frequently queried columns
  • 03
    Not using database transactions
  • 04
    Storing computed data instead of computing
  • 05
    Not backing up regularly
  • 06
    Ignoring database connection pooling

QUESTIONS

Before you commit the scope.

SQL or NoSQL for my MVP?+

SQL (PostgreSQL) for most MVPs - relational data, transactions, and proven reliability. NoSQL when you have truly unstructured data or need massive scale from day one.

Should I use an ORM?+

Yes for productivity - Prisma, Drizzle, or TypeORM. They handle migrations, type safety, and common queries. Learn raw SQL for complex queries.

How do I handle database migrations?+

Use migration tools (Prisma Migrate, Flyway). Version control migrations. Test on staging. Have rollback plans. Never modify production directly.

RELATED DECISIONS

Continue mapping the release.

DISCUSS YOUR APP

Turn this decision
into working software.

Bring the product context and current scope. We will choose the approach after the release is clear.

Discuss your app