What is the trade-off of using a "single shared database" versus "database per service" in a microservices architecture?
Correct! Well done.
Incorrect.
The correct answer is A) A shared database simplifies cross-service queries and transactions but couples services together and can become a bottleneck; database per service improves independence and scalability but complicates cross-service data consistency and queries
Correct Answer
A shared database simplifies cross-service queries and transactions but couples services together and can become a bottleneck; database per service improves independence and scalability but complicates cross-service data consistency and queries
Database-per-service aligns with microservice independence and bounded contexts but requires patterns like sagas or eventual consistency for cross-service operations that a shared database would handle with simple transactions.