Chapter 4. Making History with Event Sourcing
When it comes to the persistence needs of an application, the most common, tried, and true approach is to model data in a relational database. Following this approach has been the de facto way to store data until recently, when NoSQL (and to a lesser extent NewSQL) started to chip away at the footholds of relational database dominance. There's nothing wrong with storing your application's data this way—it's how we initially chose to do so for the bookstore application using PostgreSQL as the storage engine.
This kind of approach to storing your data can answer the "What" question, as in "What is the current state of a particular entity?". But there's another question that is sometimes just as important, and that's the "How" question, as in "How did a particular entity get into this state?". This kind of question is not something that is easily handled in a traditional...