tezvyn:

What is the difference between OLTP and OLAP?

AI-drafted, machine-checkedSource: interviewbeginner
WHAT IT TESTS

understanding two opposite workload profiles.

OUTLINE

OLTP handles many short read-write transactions on normalized current data; OLAP runs few large analytical scans over denormalized historical data.

WHAT THIS TESTS This verifies you understand that transactional and analytical workloads have opposing characteristics, which is why organizations run separate systems and pipelines for each.

A GOOD ANSWER COVERS OLTP, online transaction processing, powers day-to-day operations like placing orders or updating profiles. It handles a high volume of short, concurrent transactions, each touching a few rows, with frequent inserts and updates. Its design goals are low latency, high concurrency, and strict integrity, so it uses normalized schemas to avoid update anomalies and row-oriented storage. OLAP, online analytical processing, powers reporting and business intelligence. It runs comparatively few but heavy queries that scan and aggregate millions of rows across long time spans. Its design goals are high read throughput and fast aggregation, so it uses denormalized models such as star schemas, columnar storage, and often pre-aggregation. OLTP holds current data; the warehouse holds historical, integrated data loaded from many sources.

COMMON WRONG ANSWERS Saying OLAP is just a bigger OLTP database, ignoring the storage layout and modeling differences. Claiming you can run analytics directly on the production OLTP store without harming transactional performance; large scans contend with operational traffic and lock resources. Confusing normalization choices: OLTP normalizes, the warehouse deliberately denormalizes for query speed.

LIKELY FOLLOW-UPS Why is columnar storage better for OLAP? What is a star schema and why denormalize? How does data move from OLTP to OLAP via ETL or ELT? What is operational analytics or HTAP?

ONE CONCRETE EXAMPLE A retailer's checkout writes each sale to a normalized OLTP database in milliseconds. Overnight, those rows are loaded into a columnar warehouse where an analyst runs a query summing revenue by region and month across three years; that scan would degrade the checkout system if run there directly.

Read the original → ibm.com

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.