What You'll Master Here
transaction integrity and current lookup for OLTP; historical scans and aggregation for OLAP.
A transit network writes one row every time a card touches a gate, and two completely different readers come back for it: the gate itself, in 80 milliseconds, and three years of demand analysis. OLTP and OLAP are the names for those two readings — not for two products competing to be the database.
Step the three moves below. Each states a question, the physical work it implies, and what asking the other system would have cost.
Model for the workload: transaction integrity and current lookup for OLTP; historical scans and aggregation for OLAP.
Running analytical scans against the transactional source can slow customer operations, while forcing a write path through a reporting model weakens integrity.
- OLTP
- Transactional workload optimized for many small concurrent writes and current-state reads.
- OLAP
- Analytical workload optimized for large historical reads, calculations, and trend analysis.
- serving boundary
- The system or model responsible for a particular consumer workload.
Does card C-4471 hold enough balance to let this passenger through, right now?
- Open the gate
- Explain three years of demand
- Keep both answering the same truth
Treating OLTP and OLAP as two names for the same tables. One workload eventually degrades the other.
Start from query shape.
Separate source-of-truth writes from analytical reads.
I would keep the write path normalized and transactional and move historical reporting into an analytical store, because the workloads, latency, and query shapes are different.
Choose the model from the workload, not from a fashionable schema name.
