Trusted answers to developer questions

What is the difference between OLTP and OLAP?

Get Started With Machine Learning

Learn the fundamentals of Machine Learning with this free course. Future-proof your career by adding ML skills to your toolkit — or prepare to land a job in AI or Data Science.

Online Transaction Processing (OLTP) is a form of data storage and processing where a large number of micro, concurrent transactions are executed and stored. OLTP is used in storing financial transactions, ATMsAutomated Teller Machines, e-commerce, messaging, and flight records. Examples of OLTP systems include:

  • PostgreSQL
  • MySQL
  • MongoDB
  • Neo4j
Examples of OLTP systems

Online Analytical Processing (OLAP), on the other hand, is a form of data storage and processing that stores historical data to be used for analysis. OLAP focuses on querying records stored in data storage locations like Data Warehouses and Data Lakes. These records often originate from OLTP systems. OLAP systems are used for preparing financial reports, forecasting, etc. Examples of OLAP systems include:

  • Snowflake
  • Essbase
  • Google Big Query
Examples of OLAP systems

Below is a tabular comparison of OLTP and OLAP.

Tabular comparison between OLTP and OLAP

Basis

OLTP

OLAP

Focus

An insertion focused system

A query focused system

Nature of workload

Processes a large number of small records

Processes a few big queries

Normalization

OLTP data is normalized to reduce repetition

OLAP systems don't normalize data to improve query performance and reduce query time

Query time

Queries in OLTP systems are usually simple and take less time to execute

Queries in OLAP systems are more involved because OLAP systems are focused on querying. These queries also take longer to execute

Transaction integrity

Transactions may fail, in which case, it is the responsibility of the OLTP system to ensure data integrity and consistency

Transactions in OLAP systems may fail without causing issues since they are mainly read-only queries

RELATED TAGS

mysql
postgresql
snowflake
essbase

CONTRIBUTOR

Osinachi Chukwujama
Did you find this helpful?