OLTP vs OLAP
Redpanda SQL uses an OLAP (online analytical processing) model, optimized for analytical queries over large datasets, rather than the OLTP (online transaction processing) model used by traditional relational databases. This makes OLAP suitable for querying Redpanda topics at scale.
After reading this page, you will be able to:
-
Distinguish OLTP from OLAP processing patterns
-
Explain why Redpanda SQL uses an OLAP model
Online transaction processing (OLTP)
OLTP supports transaction-oriented applications under a three-tier architecture (such as a 3NF approach). OLTP administers day-to-day transactions through a relational database.
Some daily use cases for transactional processing include:
-
Payment: Using a debit or credit card, online or offline payment
-
Online transaction: Any reservation, ticketing, and booking system that requires transactional processing
-
ATM and online banking: Cash withdrawals or online banking operations
-
Record entry: Storing data like student score records, warehouse inventory, or customer service ticketing systems
Online analytical processing (OLAP)
OLAP provides data analysis for business decisions. With OLAP, you can query information across multiple databases and data types simultaneously, including complex queries.
Some examples of OLAP in business analytics include:
-
Personalization: personalized homepages, e-commerce recommendations, and content platforms
-
Sales analytics: comparing sales across different time periods stored in separate databases
-
Customer behavior: determining customer behavior across industries
-
Trend analysis: statistical analysis across sectors to assist in decision-making
OLTP and OLAP comparison
The following table outlines the main differences between OLTP and OLAP:
| Parameter | OLTP | OLAP |
|---|---|---|
Process |
A transactional mechanism for controlling database modifications |
Online analysis and data retrieving process |
Characteristic |
Large numbers of online transactions |
Large volume of data |
Method |
Traditional DBMS |
Data warehouse |
Database normalization |
Normalized |
Unnormalized or denormalized |
Operation |
|
Mostly |
Response time |
Milliseconds |
Seconds to minutes, depending on the data amount processed |
Storage size |
Small database |
Large database |
Response |
Quick results for frequently accessed data |
Consistently fast response to requests |
Audience |
Application end users |
Business analysts and decision-makers |