Course contentsShow
← System Design
Lesson 692 of 1,91919. Event Streaming PlatformsFree lesson

Streams vs Traditional Databases

How event streams differ from databases: append-only logs, temporal ordering, and continuous consumption patterns.

Streams vs Traditional Databases

What you'll learn: How event streams fundamentally differ from traditional databases in storage, access patterns, and usage philosophy.

The Core Difference

Traditional databases are designed for state: they store the current version of your data, overwriting or deleting records as they change. Event streams are designed for change: they store an immutable, ordered log of every event that happened, preserving the complete history.

Think of a database like a whiteboard where you erase and rewrite information, versus a stream like a journal where every entry is permanent and timestamped.

Key Distinguishing Characteristics

Append-Only Logs: Streams never update or delete events—they only append new ones. Once written, an event is immutable. Databases routinely UPDATE and DELETE rows, losing historical context.

Temporal Ordering: Every event in a stream has a strict position in time. The sequence matters. With databases, you query by current state ("show me all active users"), not by when changes occurred unless you explicitly build audit logs.

Continuous Consumption: Streams are designed for consumers to read continuously, processing events as they arrive. Databases are queried on-demand with sporadic SELECT statements. A stream consumer might run 24/7, reacting to every new event.

Different Questions Answered: Databases answer "what is the state now?" Streams answer "what happened, when, and in what order?"

When Each Fits

Use databases when you need fast lookups of current state: "What's this user's email address?" Use streams when you need to react to changes, audit what happened, or replay history: "How did this account reach its current state?"

Key Takeaway: Event streams are append-only, time-ordered logs designed for continuous consumption of change events, while traditional databases store mutable state optimized for point-in-time queries.