<aside>

This section is part of the 5-hour Microservices course by Mukul Raina

SLIDE 66: Section Intro

Section 5: Data Ownership and Read Models

This is where microservices get genuinely hard. Most engineers can split a system into services and pick communication protocols. Far fewer can answer the question that follows: when each service owns its own database, how do you handle the data that multiple services need?

In a monolith, you join tables. In microservices, those tables live in different databases owned by different services. You cannot join across service boundaries. Every pattern in this section exists to solve that fundamental problem.

What We Will Cover:

  1. The database-per-service principle and why it is non-negotiable
  2. The shared database anti-pattern and exactly how it breaks independence
  3. Cross-service reads: API composition and materialized views
  4. Cross-service writes: events and workflows
  5. Data duplication as a deliberate trade-off
  6. Eventual consistency and the read-your-writes problem
  7. CQRS: separating write models from read models
  8. Reference data ownership, search indexing, cache ownership, and reporting
  9. Schema migration strategies across independently deployed services

Where This Appears in Real Systems:

In a platform like Amazon, when you view a product page, the data comes from at least five different services: catalog (product details), inventory (stock status), pricing (current price), reviews (ratings), and recommendations (similar products). None of these services share a database. The product page is assembled from data owned by independent services, each using a different strategy to make its data available.

<aside>

Mukul Raina | youtube.com/@mukulraina | slides.mukulraina.com | LinkedIn

</aside>