The capabilities and strong consistency guarantees provided by relational databases make for the simplest approach to implementing append-only persistence. The fact that many enterprises have already standardized on one or more relational database products means there is little to no cost or learning curve to using them for Event Stores.
Since the MySQL database is a popular open source relational database server that is available on several platforms, we will use it to implement an Event Store. The
IAppendOnlyStore, acting as an access layer. It will be used to save Events as binary data into an
ES_Events table, and to subsequently load those persisted Events.
Here’s the table definition, ...