Online Analytical Processing (OLAP)
OLAP databases are built to quickly answer complex, multi-dimensional questions, unlike transactional (OLTP) databases that handle individual records. They power business intelligence tools for sales and marketing analysis.
THE MENTAL MODEL: Think of a database as a tool for answering questions about data. A standard transactional database (OLTP) is like a librarian fetching one specific book. An Online Analytical Processing (OLAP) system is like a research assistant who has already read all the books and can instantly tell you the most common themes across the entire 19th-century collection. OLAP is optimized for fast, complex, multi-dimensional analysis, not for fetching or updating single records.
HOW IT WORKS: OLAP achieves its speed by focusing on answering multi-dimensional analytical (MDA) queries. Instead of organizing data in simple rows and columns optimized for transactions (e.g., one customer purchase), OLAP systems structure data to represent multiple business dimensions like time, geography, and product category. This structure allows for rapid aggregation, filtering, and pivoting. A query asking for total sales across all regions for the last quarter doesn't have to scan every single transaction; the system is built to compute these summaries efficiently.
WHEN TO USE IT: OLAP is the backbone of business intelligence (BI). Use it for applications that require interactive exploration of large datasets. This includes business reporting for sales and marketing, management dashboards, budgeting and forecasting, and financial reporting. Anytime a user needs to 'slice and dice' data—viewing it from different angles to spot trends or anomalies—an OLAP system is the right tool.
WHEN NOT TO USE IT: Do not use an OLAP database as the primary data store for a user-facing application. Its architecture is optimized for large, complex read queries and bulk data loads, making it very inefficient at handling the high volume of small, individual read/write operations typical of an application backend (e.g., creating a user account, updating a profile, or saving a shopping cart). For that, use a traditional Online Transaction Processing (OLTP) database.
ONE CANONICAL EXAMPLE: A national retail chain uses an OLAP system to analyze sales data. A business analyst can ask the system for 'total revenue by product category in the Northeast region for the month of May'. The system can answer this in seconds. The analyst can then 'drill down' to see the weekly numbers, or 'pivot' to compare the performance of the Northeast region against the Southwest region for the same period, all without writing complex database queries or waiting minutes for results.
Read the original → en.wikipedia.org
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.