What are the differences between OLTP and OLAP systems?
Instruction: Describe the main differences between Online Transaction Processing (OLTP) systems and Online Analytical Processing (OLAP) systems.
Updated
Official answer
OLTP supports operational transactions, such as placing an order or reserving stock. Typical work involves selective reads/writes, short transactions, many concurrent users and low response latency. Correct constraints and concurrency behavior are central.
OLAP supports analytical questions over larger sets, such as revenue trends by month, product and region. It often scans selected columns, joins dimensions and aggregates historical facts. Columnar storage, partition pruning and dimensional models can suit that workload, but OLAP can also query detailed facts rather than only preaggregated data.
These are workload descriptions, not absolute product categories. Analytical engines can provide transactions, and an operational database can run analytical queries. Hybrid systems exist, but competing workloads still need resource and consistency management.
If analytics is fed from operational data, specify freshness, duplicate handling, corrections and reconciliation. A dashboard on a delayed replica or warehouse may not reflect the latest committed transaction. Choose separation or coexistence from measured query cost, latency targets, write load and operational complexity rather than assuming either model handles every request efficiently.