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.
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.
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.
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.
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.
Systems Architecture
Debezium — Debezium Features — https://debezium.io/documentation/reference/stable/features.html; Microsoft Learn — What is change data capture (CDC)? — https://learn.microsoft.com/en-us/sql/relational-databases/track-changes/about-change-data-capture-sql-server
