What OLTP and OLAP mean
Two jobs use the same business data and need it shaped in different ways.
A shop keeps its data in a database. Two different jobs use that data.
The first job is the shop app. A customer buys a pen, and the app saves the order. This job is called OLTP, short for online transaction processing.
A transaction is one small change that must fully succeed or fully fail.
The second job is analysis. An analyst asks a question about the whole business. For example: how much did we earn from paid orders in each country?
This job is called OLAP, short for online analytical processing.
Both jobs use the same shop data. This is the shop as in the SQL chapters: Asha is still in IN, and order 103 is still there.
In this chapter you will learn:
- How the two jobs differ.
- Why the app stores its data in many small tables.
- Why analysts want one wide table instead.
- How tables are written to disk, by row or by column.
- Why you copy data into a separate database for analysis (a warehouse).
