OLTP
OLTP (Online Transaction Processing) refers to systems designed for fast, high-concurrency, small read/write transactions — like inserting an order or updating an account balance — typically backed by normalized relational schemas.
Overview
OLTP systems run the operational side of a business: processing an order, updating an inventory count, recording a login, transferring funds. They're characterized by many short transactions happening concurrently, strict consistency requirements (ACID: Atomicity, Consistency, Isolation, Durability), and schemas normalized to 3NF or beyond to avoid update anomalies and keep writes cheap and safe. Row-oriented storage is typical, since a transaction usually reads or writes a whole row (a full order, a full customer record) at once.
Traditional relational databases like PostgreSQL, MySQL, and SQL Server are the classic OLTP engines. The design priorities are the opposite of an analytical (OLAP) system: OLTP favors fast, isolated, single-row operations over fast full-table scans and aggregations.
Example
Copy code
-- Typical OLTP schema: normalized, small transactions
CREATE TABLE accounts (
account_id INTEGER PRIMARY KEY,
balance DECIMAL(12,2)
);
-- A single, fast, ACID transaction
BEGIN TRANSACTION;
UPDATE accounts SET balance = balance - 100 WHERE account_id = 1;
UPDATE accounts SET balance = balance + 100 WHERE account_id = 2;
COMMIT;
This kind of query — touch one or two rows, commit immediately, thousands of times a second from many concurrent users — is what OLTP engines are built and indexed for.
OLTP vs. OLAP
Data warehouses don't replace OLTP systems; they consume from them. A typical pipeline extracts data from OLTP source systems (the app's production database), transforms it, and loads it into an OLAP-oriented warehouse for analytics — because running heavy analytical aggregations directly against a production OLTP database risks slowing down the live application.
DuckDB angle
DuckDB is explicitly not an OLTP engine — it's a columnar, vectorized engine built for OLAP-style analytical scans and aggregations, not for high-concurrency single-row transactional writes. The standard pattern is to extract data from an OLTP system (via a connector, CDC, or periodic export) and load it into DuckDB or MotherDuck for the analytical workloads OLTP databases handle poorly.
Related terms
OLAP (Online Analytical Processing) and OLTP (Online Transaction Processing) are two workload categories: OLTP handles many small, concurrent transactional writes on normalized schemas, while OLAP handles large read-heavy analytical queries on denormalized, columnar data.
HTAP →HTAP (Hybrid Transactional/Analytical Processing) describes database systems designed to handle both transactional (OLTP) and analytical (OLAP) workloads on the same data, without a separate ETL pipeline moving data between two systems.
Online Analytical Processing (OLAP) →A complete guide to Online Analytical Processing (OLAP). Learn about OLAP cubes, the differences between OLAP and OLTP, and the types of OLAP systems (MOLAP, ROLAP, HOLAP).
Data normalization →Data normalization is the process of structuring relational tables to reduce data redundancy and prevent update anomalies, typically by applying a sequence of rules called normal forms.
Row-oriented storage →Row-oriented storage is a data layout that stores each record's fields contiguously on disk, so a whole row can be read or written in a single operation.
Data warehouse →A data warehouse is a centralized system designed to store structured, cleaned data and support fast, complex analytical queries (OLAP), as opposed to the high-volume transactional workloads of an operational database.
FAQS
Online Transaction Processing — systems designed for fast, high-concurrency, small transactions like inserting an order or updating a balance, typically with normalized schemas and strict ACID guarantees.
No. DuckDB is a columnar, analytical (OLAP) engine optimized for scans and aggregations over large datasets, not for high-concurrency single-row transactional writes, which is what OLTP workloads require.
