Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Break a monolithic database by changing who owns and accesses data—not simply by copying tables onto separate servers. Give each service authority over its own data, make other services use its API or published events, and move ownership in stages when the application allows it. Separate physical databases can come later; the essential boundary is that other services no longer depend on the owner’s tables.

What “breaking up the database” actually means

A system can have services separated in code and still be tightly coupled if they read and write the same schema. A change to one service’s tables can then force changes or coordination across several consumers. The durable goal of decomposition is to make a service responsible for its data and behavior, and to expose the data other services need through an explicit interface.

AWS Prescriptive Guidance describes the principle this way: “Loose coupling is the core characteristic of a microservices architecture, because each individual microservice can independently store and retrieve information from its own data store.” The important phrase is “its own”: a service’s data store may initially be a logical database with separate credentials on shared database infrastructure. Ownership does not require buying or operating a separate server for every service.

Choose the boundary before choosing the database

Start with a business capability or subdomain whose behavior and data belong together. The service that owns that capability should be the authoritative writer for its data. Other services should request changes or information through the owner’s API, or consume events the owner publishes, rather than issuing queries against its tables.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

This boundary lets the owning service alter its schema or persistence implementation without requiring every consumer to change in lockstep. It also makes responsibility clearer: there should be an explicit answer to which service can accept an authoritative change to each datum.

Compare the three common database arrangements

Arrangement Ownership and coupling Transactions and reads Operational implications
Shared database and schema Services may still depend directly on one another’s tables; schema changes can require coordination. Local joins and transactions can be straightforward, but they can hide cross-service dependencies. Fewer stores to operate, but technical separation in code alone does not establish data ownership.
Logical database per service on shared infrastructure Separate logical databases and credentials can establish ownership boundaries while keeping infrastructure shared. Cross-service reads and business workflows still need explicit designs; separate logical ownership does not make them local operations. Can separate access and ownership before adopting separate physical infrastructure.
Physically separate database per service Strongest store-level separation; a service can choose and change its persistence independently. Cross-service joins and atomic transactions are harder and need alternatives such as API composition, materialized views, or workflow coordination. More stores increase the work of provisioning, securing, backing up, observing, and recovering them.

Database-per-service is not a rule that every service must have a different database product or server. The tradeoff is between reducing direct schema coupling and taking on more complex reads, transactions, synchronization, and operations. AWS guidance also calls out data duplication, latency, and eventual consistency as concerns to evaluate.

Plan the migration as a change in authority

A gradual extraction is often more manageable than moving every table and consumer at once. The Strangler Fig pattern supports routing functionality progressively, while an anti-corruption layer can help old and extracted components coexist. A synchronization component may also be needed while data is moving between them. Coexistence is not automatically safe: dual paths introduce synchronization and consistency risks that must be designed and observed.

  1. Select one bounded capability. Identify the behavior and data that can be owned together. Avoid defining a service boundary solely around a table if the behavior that changes it belongs elsewhere.
  2. Declare the authoritative writer. Decide which system may accept authoritative writes for each datum during every migration stage. Define how conflicting writes are prevented and what happens if a change cannot be synchronized.
  3. Establish the service boundary. Give the new owner an API or event interface, then move callers away from direct table access. A logical database and credentials on shared infrastructure can be an intermediate ownership boundary.
  4. Move data and readers deliberately. Migrate or replicate the data the new owner needs, then change consumers to use the owner or an explicit read model. Keep the old path only for as long as the coexistence plan requires it.
  5. Define rollback and completion. Decide how to reverse or pause the transition while old and new components coexist, and how to verify that consumers no longer depend on the old schema. Retire old schema access only when its remaining responsibilities are understood.

The order of data movement and reader changes depends on the application’s invariants and constraints; there is no universal migration sequence. What matters is making authority, synchronization, conflict handling, rollback, and the completion condition explicit.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3

Design cross-service writes as workflows

Once a business operation spans services with separately owned stores, it is no longer one local database transaction. A Saga coordinates the operation through local transactions in multiple services. That changes how failure and consistency work: the operation can involve several steps rather than one atomic commit, so the workflow must account for what happens when a step fails.

If a service needs to update its own data and publish a message as part of a reliable change flow, the transactional outbox is a relevant pattern to evaluate. The pattern name alone does not establish delivery guarantees or prescribe an implementation; those depend on the system’s design.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Give cross-service reads an explicit design

When a screen or operation needs data from multiple owners, decide whether to fetch it at request time or serve a prepared view. The right choice depends on freshness requirements, latency, query shape, and data volume.

  • API composition: Fetch the needed information from the owning services and combine the responses. This keeps ownership with the services, but the combined read depends on calls to those owners.
  • CQRS with a materialized view: Maintain a queryable view from events when the read shape or request-time composition calls for a separate model. The view is derived data, so its freshness and update behavior need to fit the use case.

Neither approach makes distributed data identical to a local join. Set expectations for how current the result must be and choose a design that satisfies them rather than adopting a pattern by name.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check whether the split is worth its cost

Before creating more stores or service boundaries, evaluate the tradeoffs against the actual application:

  • Ownership: Can a service change its schema without coordinating with direct table consumers?
  • Transaction scope: Which business invariants truly need coordinated changes across owners, and can they be handled as a workflow?
  • Read shape: Are cross-service reads better served by owner APIs, API composition, or a materialized view?
  • Freshness: How much delay or staleness can the user-facing read and business rule tolerate?
  • Operations: Can the team provision, secure, back up, observe, and recover the additional stores?
  • Reversibility: Can reads and writes move in stages, and is rollback defined while old and new paths coexist?

If the application does not need independent ownership, deployment, or persistence choices for a capability, adding a physical database boundary may create work without solving a meaningful coupling problem. Conversely, a logical boundary can be a useful first step even when infrastructure remains shared.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.