I built my own event sourcing lib and I opted for option 2 and here’s why.
- You query the event stream by aggregate id not event type.
- Reproducing the events in order would be a pain if they are all in different tables
- It would make upgrading events a bit of pain
There is an argument to say you can store events on a per aggregate but that depends of the requirements of the project.
I do have some posts about how event streams are used that you may find helpful.
-
6 Code Smells With Your CQRS Events and How to Avoid Them
-
Aggregate Root – How to Build One for CQRS and Event Sourcing
-
How to Upgrade CQRS Events Without Busting Your Event Stream