Change Data Capture

Problem

Another system needs to know when database records change. Constantly querying: “Anything changed?” is inefficient and can miss useful change semantics.

Solution — CDC

Capture inserts, updates and deletes from the database's change stream/log. Typically, a connector reads committed changes and publishes them as events—for example, PostgreSQL's logical replication stream → Debezium connector → Kafka → consumers. SQL Server CDC instead records changes from its transaction log in change tables, which a connector or application reads. The connector sends those changes to another system and saves how far it has read. After a restart, it continues from that saved position.
Database UPDATE
      ↓
CDC event
      ↓
Consumer
Core idea: CDC turns database changes into a consumable stream of change information.