Who owns the order tables if all modules share a database? The order module. Others read through its contract, not directly in its tables.Data ownership
This is how the building blocks hang together
Data ownership clarifies who is responsible for rules and state. Persistence and polyglot persistence choose the stores, partitioning splits them. Transactions and consistency govern changes, a saga links several; replication and caching keep copies available.
Here you clarify in the shop who owns the order tables, what must hold together when something changes, and how data is distributed and sped up. That tells you who may change state. Each building block shows its theme at our shop.
This is what you learnYou can specify exactly one responsible module for order, payment and inventory data.
In the shopIn the modular monolith, tables are located in a database, but remain assigned to individual modules. Shared storage does not override data sovereignty.
This is what you learnYou must enforce data ownership across separate services while handling cross-service queries, transactions, and migrations. You can compare the three central guarantees.
In the shopThe current shop remains a modular monolith with seven modules and one shared database; each module owns its tables. A hypothetical service split gives Payment private storage and removes all table access from Order. Order status receives payment information through a versioned contract and projection. The team migrates incrementally, tests permissions, duplicate events, and projection rebuild, and adopts the split only when the quality benefit justifies distributed cost.
This is what you learnYou can determine which order changes belong atomically in a local transaction.
In the shopThe checkout stores order B-1042 with position P-7 and order amount in the shop database. The charge to the payment provider is an external call.
This is what you learnYou can formulate different visibility commitments for inventory reservation and customer overview.
In the shopThe warehouse reservation must check the current stock binding. A customer service overview may show the new shipping status a few seconds later.
This is what you learnYou can explain why a copy of the reader can show an older order status immediately after a change.
In the shopVariant: The shop uses a reader copy of the order database for customer service queries in order to keep many queries away from the writing system.
This is what you learnYou can distinguish entry replication, commit index, and application processing and derive a concrete failure test.
In the shopThe current shop remains a modular monolith with seven modules and one shared database. For a hypothetical standalone order stream, a leader writes each order to a replicated log with three nodes. The platform acknowledges an entry only after the configured majority has stored it durably and marks the committed index. The team isolates a follower, performs a leader change, and proves that the committed prefix remains intact and the returning follower catches up without duplicate business effects.
This is what you learnYou can distinguish local WAL durability, crash recovery, and additional replication guarantees.
In the shopThe current shop runs Catalog, Cart, Order, Payment, Inventory, Shipping, and Invoice as seven modules in a modular monolith with one shared database. For a hypothetical separate payment database, the server confirms an authorization only after the required WAL records are durable. The team terminates the process after commit but before the data page write and verifies recovery after restart. Only an additionally configured synchronous replication rule would include acknowledgement by a second node in the commit guarantee.
This is what you learnYou can select a partition key and recognize a cross-partition query.
In the shopVariant: With a strong increase in order volume, the shop distributes orders according to customer ID on three partitions. The remaining modules remain in the modular monolith.
This is what you learnYou can set an up-to-date rule for each product description, price and stock.
In the shopThe catalogue shows product texts, prices and available quantities. These values change different times and have different consequences when obsolete.
This is what you learnYou can assign each memory used an independent task and a significant source.
In the shopVariant: The grown shop keeps orders relational, searches for products in a search index and stores product images in an object memory. The shop remains technically modular.
This is what you learnYou can arrange the local steps and appropriate compensations for a failed order process.
In the shopVariant: Warehouse and payment run as separate services, because independent operation was technically justified. Order coordinates the reservation and the externally connected payment provider.
This is what you learnYou can explicitly assign data sovereignty and writing responsibility to a shared database.
In the shopIn the shop, several modules read order data; the order module remains the sole scribe of the order status. Shipping reports changes through a module contract.
This is what you learnYou can distinguish CDC from log-based CDC and define a testable contract for capture source, position, schema, and recovery.
In the shopThe current shop remains a modular monolith with seven modules—Catalog, Cart, Order, Payment, Inventory, Shipping, and Invoice—and one shared database. For a hypothetical search projection, Order writes a business change and an outbox record atomically. A log-based CDC connector reads the committed outbox record, publishes it, and stores its position. The team stops the connector after publication, restarts it, and tests duplicate handling, lag, and schema evolution before adopting this distributed extension.