What problem can occur when you separate the write and read databases without using event sourcing?
Without event sourcing's strict, sequenced event log, an event bus delivering messages between a write database and a read database has no built-in guarantee of ordering. A later event, such as a withdrawal, could in principle reach the read side before an earlier event, such as the deposit that preceded it, since ordinary message delivery doesn't enforce per-aggregate sequencing on its own. This can silently corrupt a read model — a running balance computed incrementally in the wrong order produces a wrong result, with no error surfaced anywhere. Event sourcing fixes this by assigning every event for a given aggregate a strict, increasing sequence number the moment it's stored, so a projection always processes that aggregate's events in the exact order they truly happened.
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response