Skip to content
LakeBench
ProblemsCommunityPricing
Sign inStart practicing
Back
  1. Home
  2. Interview prep
  3. OLTP vs OLAP

Batch & Streaming · Streaming Processing

OLTP vs OLAP

Easystream-30
OLTPOLAPwarehousetransactions

Question

What is the difference between OLTP and OLAP?

Solution

OLTP (Online Transaction Processing): systems that run the business day-to-day. Lots of small reads/writes, strict consistency, normalized schemas. Examples: order DB, payments DB.

OLAP (Online Analytical Processing): systems for analysis. Large scans, aggregations, historical trends. Columnar warehouses and lakehouses. Examples: Snowflake, BigQuery, Redshift, Databricks SQL.

OLTP:  UPDATE orders SET status='paid' WHERE id=42   (point lookup)
OLAP:  SELECT day, SUM(amount) FROM fct_orders GROUP BY day  (scan + agg)

How they connect

CDC/ETL/ELT moves OLTP changes into OLAP models so analysts do not hammer production DBs.

Interview tip: "OLTP = run the app; OLAP = analyze the business." Mention different schemas (3NF vs star) as a follow-up.

PreviousNext