Answer the question
In order to leave comments, you need to log in
How to use DB data model with microservices?
There is a big database. It is planned to write a number of microservices to work with it. Each microservice will run through an ORM. It is clear that in order to work through the ORM, the microservice must have a database data model.
Question. What to do if you need to make changes to the database. After all, if we change the schema, then the schema change will affect the remaining n services. Which will need to be rebuilt with a new database schema and tested each, that nothing has fallen off.
And if you do not have a common database schema, then it becomes even more difficult.
To the question why microservices. So that as a result of an error everything does not fall at once and it is possible to fix the broken component, scoring everything else.
Answer the question
In order to leave comments, you need to log in
For good, each microservice should work with its own database.
And so, split the microservices so that changing the database schema does not lead to changes in all microservices.
Well, write tests, tests and more tests.
In order not to look for where which tables are used, but to run tests and see what "fell" where
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question