Digital Lexicon Hub logo

Digital Lexicon Hub

THE TECHNICAL LANGUAGE OF DIGITAL B2B INFRASTRUCTURE

PRACTICE
DATA ENGINEERING

Change Data Capture (CDC)

A technique that detects inserts, updates and deletes in a source database and delivers them as a stream of change events to other systems.


BUSINESS RELEVANCE

CDC keeps analytics, search indexes and downstream apps current within seconds instead of nightly batch loads, without heavy queries or code changes on the production database.


IMPLEMENTATION EXAMPLE

An ecommerce team runs Debezium on PostgreSQL to stream order table changes into Apache Kafka, then loads them into Snowflake, so revenue dashboards update within a minute and deleted orders are reflected too.


LIMITATIONS

Log-based CDC requires database configuration, log retention and handling of schema changes, and initial snapshots of large tables take time. It captures row changes, not business meaning, so events often need transformation.


TECHNICAL EXPLANATION

Log-based CDC reads the database's write-ahead or transaction log, such as the PostgreSQL WAL or MySQL binlog, and converts each committed change into an event with before and after values, operation type and transaction metadata. SQL Server instead copies changes into change tables through a capture job. Alternatives such as timestamp polling and triggers miss deletes or add load. CDC feeds a Data Pipeline or an Event-Driven Architecture through brokers like Kafka.


Secondary Topics

Systems Architecture