Recall & Review
beginner
What is database decomposition in microservices?
Database decomposition means splitting a big database into smaller, independent databases for each microservice. This helps services work independently and scale better.
Click to reveal answer
beginner
Name two common strategies for database decomposition.
1. Vertical decomposition: splitting by business capabilities or domains.<br>2. Horizontal decomposition: splitting by rows or data ranges.
Click to reveal answer
intermediate
Why is it important for each microservice to have its own database?
Having separate databases avoids tight coupling, allows independent scaling, and reduces the risk of one service affecting others.
Click to reveal answer
intermediate
What challenges arise from database decomposition in microservices?
Challenges include data consistency across services, complex queries needing data from multiple databases, and managing distributed transactions.
Click to reveal answer
advanced
How can eventual consistency help in database decomposition?
Eventual consistency allows services to update their own databases independently and sync changes asynchronously, improving performance and availability.
Click to reveal answer
What is the main goal of database decomposition in microservices?
✗ Incorrect
Database decomposition splits a large database into smaller ones owned by individual microservices.
Which decomposition strategy splits data by business capabilities?
✗ Incorrect
Vertical decomposition splits the database by business domains or capabilities.
What is a common challenge when using separate databases per microservice?
✗ Incorrect
Maintaining data consistency across multiple databases is a key challenge.
Which approach helps microservices sync data asynchronously?
✗ Incorrect
Eventual consistency allows asynchronous syncing between services.
Why should microservices avoid sharing a single database?
✗ Incorrect
Sharing a database creates tight coupling and limits independent scaling.
Explain the main strategies for decomposing a database in a microservices architecture and their benefits.
Think about splitting data by function or by data slices.
You got /3 concepts.
Describe the challenges that arise from database decomposition and how eventual consistency can address some of them.
Consider what happens when data is spread across services.
You got /4 concepts.