beginnerThe Database-per-Service Problem

What new problems does splitting a single shared database into one database per microservice actually introduce?

Three problems appear almost immediately once databases are split apart: cross-service queries, where a screen needs data owned by several services at once and there's no longer one database to query for all of it; data consistency across services, where a single business action that touches multiple services can partially succeed, leaving the system in an inconsistent state with no built-in mechanism to catch or undo it; and data duplication, where a service that keeps its own local copy of another service's data risks that copy silently drifting out of sync over time. None of these problems existed when everything lived in one database with one shared transaction boundary — they are the direct cost of gaining independent deployment, scaling, and fault isolation. Every one of them has established solutions, but none of them is optional to address once a system is split this way.

Ready to master this question?

Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.

Sign in to generate a response

Next Step

Continue to Why is it risky to perform slow operations inside a subscribing event handler?← Back to all Event-Driven Microservices questions