0
0
Microservicessystem_design~5 mins

Database decomposition strategy in Microservices - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
ATo split a large database into smaller, service-specific databases
BTo merge multiple databases into one big database
CTo create backups of the database
DTo encrypt the database for security
Which decomposition strategy splits data by business capabilities?
AHorizontal decomposition
BFunctional decomposition
CData replication
DVertical decomposition
What is a common challenge when using separate databases per microservice?
AFaster queries
BData consistency across services
CSimpler backups
DReduced network traffic
Which approach helps microservices sync data asynchronously?
AStrong consistency
BSynchronous replication
CEventual consistency
DMonolithic database
Why should microservices avoid sharing a single database?
AIt increases coupling and reduces scalability
BIt improves data security
CIt simplifies deployment
DIt reduces data duplication
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.