Probably the leading persistence-related change introduced by the microservices architecture is strong encouragement to not share data stores between services. This means that each logical service owns and manages its database (if it requires a database at all) and ideally no other service can access the data in a way that is different from a service API call.
It is out of this book's scope to explain all the reasons for such separation, but the most important ones are as follows:
- The ability to evolve different services separately, without tight coupling on a database schema
- The potential for more precise resource management
- The chance of horizontal scalability
- The possibility to use the best fit ...