# CQRS/ES Scenario
Assuming we were building a dedicated "Comment" service which is structured in topics and comments like so:
Topic #1
Comment #1
Comment #2
Comment #3
Topic #2
Comment #1
Comment #2
Comment #1
Comment #2
Comment #3
Comment #3
2
3
4
5
6
7
8
9
10
11
12
So we deal with lists of Topics and Commments (like in traditional CRUD) and want to keep an extra projection Threads which provides a tree-like preview combined of Topics and Comments.
# Write Models (Aggreggates)
All write commands get stored as event within the events collection. Appending any change as event to that collection is optimized for fast writes.
- Topic: a single topic aggregated from
eventscollection - Comment: a single comment aggregated from
eventscollection
# Read Models (Projections)
Read models store their current (projected) state within dedicated collections. Their data models and collections are optimized for fast reads.
- Topics: a list of topics stored in
topicscollection - Comments: a list of comments stored in
commentscollection - Threads: a list of threads stored in
threadscollection
As you see: While virtually writing to 2 data models we can now maintain 3 differnet representations of these models on the read side. In addition we might even add another 4th read model by replaying all exitings events throughout it's projection.