Hybrid Transactional & Analytical Processing
OLTP and OLAP together?! How it fits into Real-Time
So what is a Hybrid Transactional & Analytical Processing (HTAP) database? Simply stated, they are databases that support both OLTP and OLAP workloads. This is possible. Conceived by Gartner nearly a decade ago (2014) saying,
“It breaks the wall” between OLTP and OLAP.
But wasn’t there a reason why OLTP and OLAP workloads were separated to begin with? This “wall” was put there intentionally.
To better understand what HTAP is, we’ll need to revisit the differences between OLTP and OLAP databases. Then we’ll try to understand how HTAP could work and how they fit in real-time, streaming use cases.
OLTP Databases
On-Line Transactional Processing databases (OLTP) are databases that typically are used in operational applications. Operational applications can be either user (consumer) facing or business facing (or both). Most importantly, they are applications that generate revenue for the business.
The actions (or transactions) that occur in operational databases are CRUD (create, retrieve, update, delete). For example creating orders, browsing menus, changing orders, and canceling orders. These transactions operate at the record level which requires the database to have ACID properties. ACID stands for atomicity, consistency, isolation, and durability. These properties ensure that a set of changes made to the database are kept in a valid state even in the event of unexpected errors.
OLAP Databases
On-Line Analytical Processing databases (OLAP) are databases that typically are used to aggregate data for analytics. For example sum, min, max, etc. OLAP databases are usually column oriented data stores which provide better optimizations for performing analytical queries. These optimizations make OLAP databases not have ACID properties because their goal isn’t to have optimum writes but instead to have optimal analytical queries. These databases are used to serve data for graphs and reports, data mining, and AI.
Keep reading with a 7-day free trial
Subscribe to SUP! Hubert’s Substack to keep reading this post and get 7 days of free access to the full post archives.