Most small SaaS teams should start with one primary database and add another durable database only when a measured boundary justifies it. Multiple databases can improve isolation, workload independence, team ownership, or scaling, but every additional stateful system also adds migrations, credentials, monitoring, recovery, synchronization, and incident work.
Raff Technologies supports both approaches. Teams can keep a simple relational source of truth on Managed PostgreSQL or Managed MySQL, add Managed Valkey for cache and other supporting state, or self-host database workloads on Raff VM when host-level control is required.
The important question is not "How many databases should a SaaS have?" It is which system owns each fact, why another database is needed, and whether the team can operate every recovery path it creates.
One database vs multiple databases: quick decision
| Situation | Better starting point |
|---|
| Small team, one product, strongly related transactional data | One primary relational database |
| Files, uploads, exports, or media | Keep metadata in the database; move objects to Object Storage |
| Cache, sessions, rate limits, or short-lived coordination | Add a key-value store such as Valkey |
| Analytics queries disrupt customer-facing transactions | Separate the analytical workload |
| A service has a genuinely independent data model and owner | Consider a service-owned database |
| A tenant requires stronger technical or contractual isolation | Consider schema-per-tenant or database-per-tenant |
| Different domains need different recovery or scaling policies | Consider separate durable databases |
| The reason is only "microservices should have many databases" | Stay simpler until the boundary is real |
A second database should remove a real constraint. It should not exist only to make the architecture look more distributed.
One primary relational database is the safest default for many small SaaS teams
A single PostgreSQL or MySQL database keeps the hardest state-management responsibilities together:
- transactions;
- constraints;
- schema migrations;
- access control;
- backup policy;
- point-in-time recovery where available;
- monitoring;
- restore testing;
- reporting consistency.
A common early architecture is:
Application
↓
Primary PostgreSQL or MySQL
↓
Object Storage for files
This is usually a strong fit when:
- one engineering team owns most of the product;
- users, organizations, permissions, billing, projects, and subscriptions are closely related;
- business operations need transactions across several tables;
- the schema changes frequently;
- reporting benefits from a consistent relational view;
- one recovery plan is easier to operate than several.
One database does not mean one poorly structured schema. Teams can separate domains using schemas, table ownership, permissions, naming conventions, modules, and service boundaries without immediately creating another durable database.
Multiple databases make sense when the boundary is operationally real
A multi-database architecture becomes useful when the systems genuinely need different behavior.
| Boundary | Stay with one database when | Split when |
|---|
| Workload | Queries coexist without meaningful contention | Reporting, analytics, batch jobs, or search disrupt transactional traffic |
| Data model | Relational tables plus bounded JSON fit the workload | Another model clearly matches the access pattern better |
| Team ownership | One team owns the domain | Separate teams/services require independent ownership |
| Scaling | One database can scale with tuning, pooling, replicas, or vertical growth | A workload needs independent capacity or topology |
| Recovery | The same RPO/RTO applies | One domain needs a different recovery or availability objective |
| Tenant isolation | Logical controls satisfy requirements | Contractual or technical requirements demand a stronger boundary |
| Lifecycle | Data shares retention and backup policy | Logs, events, or archives require materially different retention |
Every additional durable database creates another:
- credential boundary;
- schema and migration lifecycle;
- monitoring surface;
- backup and restore path;
- capacity budget;
- failure mode;
- incident dependency.
The operational cost should be smaller than the problem the split removes.
Workload separation often provides value before database-per-service
For small SaaS teams, the first useful split is often not another transactional database.
Move files out of the database
Large uploads, generated exports, media, and binary artifacts are usually easier to operate in Object Storage. The relational database can retain object ownership, metadata, permissions, and references.
PostgreSQL/MySQL
└─ object_id, owner, metadata, permissions
Object Storage
└─ actual file/blob
This reduces pressure on the transactional store without creating another writable business source of truth.
Separate cache and short-lived state
Raff Managed Valkey can support workloads such as:
- cache;
- sessions;
- rate limits;
- idempotency keys;
- short-lived coordination;
- selected queue/worker patterns.
A clean boundary is:
PostgreSQL/MySQL = durable source of truth
Valkey = supporting state
If a Valkey key becomes impossible to reconstruct and the business cannot tolerate losing it, that data should be treated as durable state with an explicit persistence and recovery design.
See Redis Cache Strategy for SaaS Apps for the cache, queue, session, rate-limit, and durability boundary.
Reporting and analytics can generate scans, aggregations, and batch work that compete with customer-facing requests.
A safer model is often:
Authoritative transactional database
↓
replication / events / exports
↓
Derived analytics system
The analytical system is easier to recover when it can be rebuilt from an authoritative source.
Database-per-service trades transaction simplicity for independence
In a database-per-service architecture, each service owns its persistent data and other services do not directly read or write its tables. AWS and Microsoft both document this pattern as a way to reduce coupling between services, while also noting the added complexity around cross-service queries, transactions, consistency, and operating multiple stores.
| Area | Shared primary database | Database per service |
|---|
| Initial operations | Simpler | More systems to operate |
| Cross-domain transactions | Native database transactions | Workflow, events, or compensation often required |
| Schema ownership | Shared governance | Clearer service ownership |
| Reporting | Direct relational queries possible | Aggregation/read models often needed |
| Data duplication | Usually lower | Often higher |
| Independent scaling | More limited | Stronger |
| Deployment autonomy | More coordination | Greater independence |
| Backup/recovery | One main recovery system | Several recovery paths |
| Incident surface | Smaller | Larger |
For a small team, database-per-service should usually follow a real service boundary rather than create one artificially.
A useful intermediate state is possible: services may share the same physical database platform while keeping separate schemas or ownership boundaries. Microsoft notes that the main coupling problem is services sharing the same schema or directly reading and writing the same tables—not necessarily sharing the same physical database server.
Cross-database transactions are where complexity becomes visible
With one relational database, a business operation can often commit atomically:
create subscription
+ record invoice
+ assign entitlement
= one transaction
Once those facts live in independently owned databases, the same operation can span several systems.
Now the architecture needs answers for:
- partial failure;
- retries;
- idempotency;
- event delivery;
- duplicate processing;
- stale reads;
- compensating actions;
- reconciliation.
This does not make multiple databases wrong. It means distributed state requires explicit failure semantics.
If a team cannot explain what happens when database A commits and database B is unavailable, the multi-database design is not finished.
One source of truth matters more than the number of databases
A healthy multi-database system has explicit ownership.
Before duplicating data, document:
- Authority — which system owns the business fact?
- Copy type — is another copy authoritative, derived, cached, or historical?
- Synchronization — how does data move?
- Consistency window — how stale may a copy become?
- Failure behavior — what happens when the source or destination is unavailable?
- Recovery order — which system is restored first?
- Deletion flow — how do retention/privacy deletions propagate?
- Reconciliation — how are missing or divergent records detected?
Derived systems are usually easier to operate because authority remains clear.
Examples:
- a cache can be repopulated;
- a search index can be rebuilt;
- an analytical projection can be regenerated;
- a file thumbnail can be recreated from an original object.
Two independently writable databases both claiming to own the same subscription status or account balance are much harder to reason about.
Database-per-tenant is mainly an isolation decision
Multi-tenant SaaS commonly uses one of three broad models:
| Model | Advantage | Trade-off |
|---|
| Shared database, shared schema | Lowest operational overhead | Isolation is mostly logical/application-enforced |
| Shared database, separate schemas | Stronger namespace separation | Migrations and permissions become more complex |
| Database per tenant | Strong technical isolation | Provisioning, migrations, monitoring, and recovery multiply with tenant count |
Database-per-tenant can make sense when:
- contracts require stronger isolation;
- customers need independent backup/restore operations;
- dedicated capacity is part of the commercial model;
- tenant workloads vary enough to need independent sizing;
- regulatory or technical requirements justify the boundary.
It is usually not the best default for an early SaaS product with many small tenants.
Ten tenants with ten databases create ten credential sets, migration targets, health checks, backup histories, and restore paths. At larger tenant counts, the control plane for provisioning and migrations becomes a product of its own.
Recovery is the hidden cost of a multi-database architecture
A multi-database design can work well during normal operation and still fail badly during recovery if restoration order and consistency are undefined.
With several durable databases, ask:
- must they recover to the same point in time?
- what if database A is restored to 10:05 and database B to 10:12?
- can events or logs replay the missing interval?
- which database is authoritative after partial recovery?
- which features remain disabled until synchronization completes?
- how do you verify cross-system consistency before reopening writes?
Derived stores make the recovery sequence cleaner:
Restore authoritative database
↓
Validate core records and invariants
↓
Rebuild/resynchronize derived systems
↓
Validate dependent features
↓
Resume normal traffic
Use Database Backup Strategy for SaaS Apps and Database Restore Testing to define RPO, RTO, restoration evidence, and recovery validation.
Monitoring also multiplies with every durable store
Each database needs enough observability to identify whether a failure comes from the application, connection pool, queries, capacity, storage, replication, or the database service itself.
For each durable store, define at minimum:
- connection usage;
- query/error rate;
- latency;
- capacity/storage headroom;
- backup age;
- restore-test age;
- replication/failover state where relevant;
- owner and escalation path.
The Database Monitoring for Small Teams guide covers the core metrics and alerting model. The Database Incident Runbook covers triage, containment, failover/rollback/restore, validation, and follow-up.
Managed databases reduce host operations, not architecture responsibility
A managed database can reduce repetitive platform work, but it does not decide data ownership or consistency for the application.
A practical Raff architecture might look like:
Application on Raff VM / app runtime
↓
Managed PostgreSQL or MySQL
= authoritative relational state
↓
Managed Valkey
= cache / sessions / supporting state
↓
Object Storage
= files / exports / binary objects
Raff's current Managed Databases catalog provides managed database options for different workloads. Product capabilities, versions, limits, networking, recovery options, and availability features can change, so verify the live product page and console rather than relying on an old guide specification.
Teams that need root access, custom packages, unsupported topology, or another self-managed database setup can use Raff VM.
Managed infrastructure can reduce host operations. The application team still owns:
- data model;
- schema boundaries;
- source-of-truth decisions;
- queries and indexes;
- migrations;
- tenant isolation;
- credentials;
- cross-system consistency;
- validation after recovery.
A practical decision framework
Before adding another durable database, answer these questions in order.
1. What measured problem are we solving?
Examples include:
- analytics contention;
- incompatible access patterns;
- independent scaling;
- tenant isolation;
- separate recovery objectives;
- organizational ownership.
If the problem is hypothetical, keep the architecture simpler.
2. Can the current database solve it first?
Check whether the real fix is:
- indexing;
- query optimization;
- connection pooling;
- better schema boundaries;
- workload scheduling;
- read replicas where appropriate;
- moving files/blobs out of the database;
- adding a cache rather than another source of truth.
3. Who owns the new data store?
A database without a named operational owner creates ambiguous incident responsibility.
4. What is authoritative?
For every duplicated field, define the source of truth before production traffic is allowed.
5. How will it fail and recover?
Document retry, rollback, restore order, reconciliation, and degraded behavior.
SaaS multi-database checklist
Before approving another database, confirm:
Conclusion
For most small SaaS teams, one primary relational database remains the best starting point. Add supporting systems such as Object Storage or Valkey when they have a clear role, and add another durable database only when workload, ownership, data model, tenant isolation, scaling, or recovery requirements justify it.
The goal is not to keep the database count artificially low. The goal is to ensure that every new stateful system has one responsibility, one source-of-truth rule, one owner, and one recovery plan.
Continue with SQL vs NoSQL for SaaS Apps if the next decision is the data model, or Managed vs Self-Hosted Databases if the next decision is who should operate the database.
Sources