How to use a database data model with microservices?
There is a large database. We plan on writing several microservices to work with it. Each micro service will work through ORM. It is clear that using the ORM at micro service should be the database data model.
Question. What if you want to make changes to the database. After all, if we change the schema, then the schema change will affect the rest of the n services. Which will need to be rebuild with new DB schema and test each that nothing fell off.
And if you do not have a General database schema, it becomes even more difficult.
To the question why microservices. To in error all at once didn't fall and it was possible to fix a broken component, scoring on everything else.
Good for every micro service needs to work with your database.
And so, to break the microservices to change the DB schema did not lead to changes in all microsauria.
Well, write tests, tests and more tests.
Not to look where the tables are used, and run the tests and see where that fell
Garnett_Deckow answered on June 7th 19 at 15:04
For example, to work directly with the DB and through the API. Or just score microservices, because they have to be independent, but not like you.