Skip to content
RED SAGSkills
easyData Engineer interview question

What is the difference between an OLTP database and an OLAP data warehouse?

What the interviewer wants to hear

  • OLTP handles many small transactional reads and writes
  • OLAP handles large analytical queries over many rows
  • OLTP is row-oriented and normalised; OLAP is often columnar and denormalised
  • Gives example systems for each

Model answer

OLTP stands for online transaction processing. It is the database behind an app, like PostgreSQL or MySQL, handling many small, fast operations: insert an order, update a balance, read one user. It is row-oriented, highly normalised to avoid duplicate data, and tuned for low latency and strong consistency. OLAP, online analytical processing, is for questions like "revenue by region per month for 3 years". These queries scan millions of rows but only a few columns, so warehouses such as BigQuery, Snowflake or Redshift use columnar storage, compression and massively parallel processing. OLAP models are often denormalised star schemas to make queries simpler. We usually do not run heavy analytics on the OLTP database, because it would slow down the app, so we copy data into the warehouse.

Can you answer it under time pressure?

Take a timed easy round and get scored on every answer.

Start mock interview

More easy Data Engineer questions