Chapter 5: Data Design Pitfalls
Data is the lifeblood of any business application. As developers and architects, we are constantly focused on our application's data and its state, how we transport that data, and how we persist our data. In traditional approaches, such as a waterfall, the first thing we design is the database. However, in my opinion, this is the incorrect approach to take. This is because, in the beginning, our knowledge of the problem space or business domain is naïve. In turn, this could lead to many columns in our database tables that are never used and schemas that are incomplete or bloated. Microservices best practice states that each service is responsible for its own data. We should begin with the development of our domain model and then determine which persistence strategy to employ. We should design our services and identify the aggregates that make up and form the boundaries around that microservice and its transactions. In this chapter, we will...