§ 1.10section 23 of 25·~4 min
Storage: databases, warehouses, lakes and lakehouses
Where data lives decides what it costs and what you can do with it.
| Store | What it is | Good for | Examples |
|---|---|---|---|
| Operational database | The app's OLTP database | Running the product | PostgreSQL, MySQL |
| Data warehouse | Managed OLAP database for structured tables | SQL analytics, dashboards | BigQuery, Snowflake, Redshift |
| Data lake | Files in cheap object storage, any format | Raw data, huge volumes, ML, logs | Amazon S3, Google Cloud Storage, Azure Data Lake |
| Lakehouse | A lake plus table features: transactions, schemas, time travel | One copy of data for both SQL and ML | Delta Lake, Apache Iceberg, Apache Hudi |
The history in one line: warehouses were reliable but expensive and only for tables; lakes were cheap and flexible but easily turned into a "data swamp"; lakehouses add warehouse-style guarantees on top of lake storage.
File formats
| Format | Layout | Use it for |
|---|---|---|
| CSV | Row, plain text | Exchanging small files with people and vendors |
| JSON | Row, nested text | APIs and events |
| Parquet | Column, compressed, typed | Analytics on a lake: the default choice |
| Avro | Row, compact, carries its schema | Streaming messages, Kafka |
Partitioning
Big tables are split into partitions, usually by date, so a query for one day reads one folder instead of all of history:
s3://company-lake/orders/order_date=2026-10-16/part-0001.parquet
s3://company-lake/orders/order_date=2026-10-17/part-0001.parquet
on the job Many cloud warehouses charge by the amount of data a query scans. Columnar formats, partitioning and selecting only the columns you need (never SELECT * on a big table) directly cut the bill.