The place between transactions and analytics – and what it means for you
By Shane Johnson
We’ve always classified database queries as transactional or analytical. If our application has transactional queries, we use an OLTP database. If it has analytical queries, we use an OLAP database (or data warehouse). However, with analytics fast becoming a competitive differentiator for customer-facing web and mobile applications, businesses are discovering the place between transactions and analytics.
On one hand you have standard CRUD operations – view a product, add it to a cart and complete a purchase. All of these interactions are performed with transactional queries as part of a customer interaction. They typically need most or all columns in a row, and use indexes to improve performance. They’re row oriented, and are executed on an OLTP database.
On the other, you have a data analyst performing a market basket analysis to improve product recommendations. It’s performed with analytical queries as part of an employee interaction. The queries typically need a small number of columns in a row, and do not use indexes. They’re column oriented, and they would be executed on a separate OLAP database.
Then there is the place between – queries within customer-facing applications that have to sort, filter and aggregate data without the help of indexes. These queries may need to aggregate a column (or a small number of columns) for many rows and use the results to look up a small number of rows in a separate table. They are both column oriented and row oriented.
For example, say you want to alert customers of the top five soon-to-be-sold-out products based on the quantity in active shopping carts, the quantity in recent purchases (say, the last 24 hours) and current inventory. This query will use sorting, filtering and aggregation to find the product IDs for the top five soon-to-be-sold our products – column oriented and analytical. It may access many thousands, if not millions, of shopping carts and purchases – all to get the IDs of five products. It will then use them to look up five rows in the products table by product ID (i.e., the primary key) – row oriented and transactional. It’s the space between transactional and analytical, and today it’s a critical component of innovative, customer-facing applications.
More from the blog
