Summary
In this chapter, you learned how to refactor your database, exploring fundamental patterns to help achieve this goal. Database refactoring is never an easy task, nor is it one that an architect can tackle alone—it requires collaboration with a database administrator. The primary challenge often lies not in the technical approach, but in overcoming resistance from stakeholders and DBAs who may be reluctant to split the database. However, if your goal is to move toward a microservices architecture, database separation becomes essential.
First, you need to identify which tables in the original database are relevant to each service’s responsibilities. Previous chapters introduced patterns such as bounded contexts and aggregates to help guide this process. Once you’ve defined these responsibilities, you can apply one of the patterns explored throughout our journey in the database world.
Lastly, many legacy systems rely heavily on stored procedures....