Skip to content
Veltoryx Technologies
ProLesson 9.1Intermediate4 min readUpdated 31 October 2026

Database per Service & Data Ownership

Enforce strict data boundaries with Database per Service, manage intentional denormalization, and master SQL vs NoSQL database selection.

In a monolithic application, the database is often treated as an open integration hub: dozens of distinct functional modules read and write to the same relational schema, executing complex multi-table joins across hundreds of tables.

When organizations break apart monoliths, the database is almost always the most difficult part of the migration.

01The Shared Database Antipattern

Novice teams attempting microservices often split application code into separate repositories while leaving the database unified:

text
Service A (Order)    Service B (Billing)    Service C (User)
       │                    │                    │
       └────────────────────┼────────────────────┘
                            │
               [ Single Shared Database ]

Why Shared Databases Collapse Microservices:

  1. Broken Team Autonomy & Deployment Locks: If Team A alters the orders table structure, Team B's Billing queries can silently fail in production. Teams must coordinate release schedules, destroying the velocity benefits of microservices.
  2. Hidden Coupling via Foreign Keys & Stored Procedures: Relational foreign keys create invisible runtime dependencies between logically independent domains.
  3. Single Point of Failure: If an unoptimized query in the reporting service locks the shared database, customer-facing checkout and payment services crash simultaneously.
  4. Technology Monoculture: A shared database forces every service to use the same underlying storage engine (e.g. Oracle or MySQL), preventing a service from using MongoDB for document storage, Neo4j for graphs, or Elasticsearch for full-text search.

Loading the rest of the lesson…