Skip to the workspace
Pebellslearn by building
The Data Engineering Lifecycle  ›  Lesson

Data Storage

Data Storage 12 minRow stores suit single-record lookups, column stores suit scans over many rows, and object storage suits cheap bulk files, so storage is chosen by how the data will be read.

data engineer / Data Storage

Explore each scene at your own pace.

01 · The rule

The rule

Data Storage

PedalCity keeps rides in three places, and that is deliberate. The app needs to fetch one rider's current ride in milliseconds. Finance needs to add up a year of fares. The data team wants to keep every raw sensor reading for years without a huge bill. No single kind of storage is best at all three.

The rule

Store by how data is read: rows for lookups, columns for scans, objects for bulk.

Row-oriented databases (such as PostgreSQL or MySQL) keep all the columns of a record together on disk. Fetching "ride 88121, every column" is one quick read. This suits apps that read and write single records all day.

Column-oriented stores (analytical warehouses, and file formats such as Parquet) keep each column together. To total a year of fares, the engine reads only the fare column and skips the rest. Values in a column look alike, so they compress very well, and that means even less to read.

Object storage (such as Amazon S3, Google Cloud Storage or Azure Blob Storage) holds files of any kind, cheaply and in almost unlimited amounts. It is not a database: you read and write whole files. It is the natural home for raw copies and archives.

-- row store: one record, all columns
SELECT * FROM rides WHERE ride_id = 88121;

-- column store: millions of rows, one column
SELECT SUM(fare) FROM fact_rides WHERE ride_date >= '2025-01-01';

Cost follows temperature. Hot data is read often and sits on fast, pricier storage. Cold data is rarely read and can move to cheaper, slower tiers.

Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.