I am coding a new application usign CQRS+ES architecture with Event Store DB. In my app, I have the following streams:
- user-1
- user-2
- user-3
- ...
Each stream contains all events regarding a given user.
I am now creating a projection called user-account, which consists in basic data regarding my user's account (like first name, email, and others)
What is the optimal way to design that projection?
I should have a single projection for each user, creating projections called:
- user-account-1
- user-account-2
- user-account-3
- ...
Or a single projection for all user-accounts? Being it a key-value pair record (that may store millions of keys in the future)