Developer & Data Platforms

Change data capture (CDC)

Also known as: CDC, log-based change data capture

Change data capture (CDC) is a technique for detecting every change made to a database, such as new rows, updates, and deletions, and passing those changes to other systems almost immediately.

It's how a warehouse, search index, or cache stays in sync with an operational database without heavy nightly copies. While CDC sounds like a niche data engineering trick, it's become the backbone of real-time analytics and event-driven systems.

Change data capture (CDC), explained at three levels

At home

Imagine a shared family calendar. Instead of re-copying the whole calendar every night, someone texts everyone the moment an event is added or moved. CDC does that for databases, sending only the changes as they happen.

At work

CDC keeps reports, search, and other systems up to date within seconds of a change in the main database. It also puts less load on the database than repeatedly copying entire tables.

Real-world examples

At home

Lena built a side project that showed live inventory for a friend's bike shop. Using Debezium on the shop's PostgreSQL database, the website updated within seconds whenever a bike was sold in the store.

At work

Marcus is a data engineer at a Canadian online pharmacy. Nightly copies meant dashboards were always a day behind. Switching to CDC let the operations team see order delays in near real time and reroute shipments the same afternoon.

How it compares

featureChange data capture (CDC)Batch extracts
FreshnessSecondsHours to a day
Load on sourceLow, reads logsHigh during copies
Captures deletesYes, with log-based CDCOften not
ComplexityHigherLower

CDC trades simplicity for fresh data and lighter database load.

For analysts

Before paying for real-time data, ask who will act on it within minutes. I'd use CDC where faster data changes a decision, such as fraud, inventory, or logistics, and keep simpler batches elsewhere.

History & origin

Databases have long kept transaction logs for crash recovery and replication, and commercial replication tools such as Oracle GoldenGate (acquired by Oracle in 2009) used them to copy changes between systems. LinkedIn's work on Databus and later Apache Kafka in the early 2010s showed how changes could flow as streams to many consumers. Red Hat launched the open-source Debezium project around 2016, which read logs from MySQL, PostgreSQL, and others and published changes to Kafka. Cloud services, including AWS Database Migration Service and Google Datastream, made log-based CDC a managed feature. In my view, CDC finally killed the 'nightly batch' as the default, and good riddance.