Contrasting
OLTP and Data Warehousing Environments:
One
Major difference between the types of system is that data warehouses are not
usually in third normal form (3NF), Which is commonly used in OLTP
environments.
Data
warehouses and OLTP systems have very different requirements. Here are some
examples of differences between typical data warehouse and OLTP systems:
(i)
Work
Load:
Data warehouses are designed to
accommodate ad hoc queries. You might
not know the workload of your data warehouse in advance, so a data warehouse
should be optimized to perform well for a wide variety of possible query operations.
OLTP systems support only predefined
operations. Your applications might be specially tuned or designed to support
only these operations.
(ii)
Data
Modifications:
A data warehouse is updated on a
regular basis by ETL process (run nightly or weekly) using bulk data
modifications techniques. The end users of a data warehouse don't directly
update the data warehouse.
In OLTP systems, end users
routinely issue individual data modifications statements to the database. The
OLTP database is always up to date, and reflects the current state of each
business transaction.
(iii)
Schema
Design:
Data warehouses often use
demoralized or partially demoralized schemas (such as star schema) to optimize query
performance.
OLTP systems often use fully
normalized schemas to optimize update/ insert/ delete performance, and to
guarantee data consistency.
(iv)
Typical
Operations:
A typical data warehouse query
scans thousands or millions of rows. For example, "Find the total sales
for all customers last month ".
A typical data warehouse
operation accesses only a handful of records. For example, "Retrieve the
current order for this customer ".
(v)
Historical
Data:
Data warehouses usually store
many months or years of data. This is to support historical analysis.
OLTP systems usually store data
from only a few weeks or months. The OLTP system stores only historical data as
needed to successfully meet the requirements of the current transaction.