How do OLTP databases and data warehouses serve different workloads?

Instruction: Compare an order-processing transaction with a historical sales analysis. Explain the workload, modeling, history, and freshness differences without treating them as absolute product limitations.

Context: The question aims to test the candidate's knowledge of data warehousing concepts, including its architecture, purposes, and how its design considerations differ from those of operational databases used for transaction processing.

Updated

Example answer

A data warehouse integrates data for analysis, often retaining history from several operational sources. A transactional database supports the application's day-to-day operations, such as creating an order and reserving stock atomically. A warehouse is itself a database; “traditional database” is too broad to be the useful distinction. The relevant comparison is analytical versus transactional workloads.

Design concernTransactional workload (OLTP)Warehouse workload (OLAP)
Typical requestRead or update a few orders by keyAggregate sales over months and regions
PriorityCorrect concurrent transactions and low request latencyEfficient scans, joins, and aggregates over large datasets
Data organizationOften normalized to constrain updatesOften dimensional models with declared fact grain and shared dimensions
History and freshnessCurrent application state, sometimes with historyIntegrated historical records, with an explicit ingestion delay

These are design tendencies, not absolute rules: transactional systems can retain history, warehouses can support transactions, and hybrid systems exist. ETL or ELT pipelines reconcile source keys, types, business definitions, and late or corrected events. A separate analytical workload can reduce contention on the operational system, but ingestion, compute, storage, and governance add cost.

For a shop, placing an order belongs in the transactional system. Comparing monthly revenue across stores belongs in the warehouse once the source records have been reconciled. Define “revenue” and freshness requirements before choosing an architecture.

Related Questions