Summary
We have explored some important pitfalls that can hinder your microservice's data development. These include the pitfall of keeping a single shared database, where we learned that we should separate the data from a monolithic database and place it in each microservice on a separate database. The responsibility for the copying of the data will be on the owning microservice. We discussed some strategies to break the data out of a monolithic database via a code-first approach. This is done by developing a model in code first and writing a unit test to prove our assertions. Then, we move the data out of the legacy monolithic database. We also discussed the database-first strategy, which can be more complex and present a higher risk.
Additionally, we examined the pitfall of normalizing read models. Here, we learned that we don't always have to normalize the read model as we do in document databases. Document databases provide high-performance querying partly due to...