Most candidates only know Debezium. See the comprehensive CDC answer covering log-based, trigger-based, and timestamp approaches with real architecture trade-offs.
CDC During Migration - explain approaches for real-time Change Data Capture
CDC captures changes (inserts, updates, deletes) from a source database and applies them to a target. Common approaches include timestamp-based CDC which uses a last_modified column, trigger-based CDC which uses database triggers to capture changes, and log-based CDC which reads the database transaction log. Debezium is a popular tool for log-based CDC.
CDC captures row-level changes and propagates them downstream. Three approaches, each with real trade-offs:
Reads the database's Write-Ahead Log (WAL/binlog/redo log).
Postgres WAL β Debezium β Kafka β Spark Structured Streaming β Delta LakeQuery rows where updated_at > last_sync_time.
Database triggers write changes to a shadow table.
Source DB β Debezium Connector β Kafka (Avro + Schema Registry)
β Spark Structured Streaming
β Bronze table (raw CDC events)
β Silver table (MERGE with dedup)
β Gold table (business aggregates)op='d' by soft-deleting or hard-deletingListing three CDC types is a mid-level answer. The senior answer includes a real architecture diagram, explains the hard problems (schema evolution, exactly-once, DELETE handling), and shows you've dealt with the initial-load-to-CDC handoff.
Paste your answer and get instant AI-powered feedback with a FAANG-level improved version.
Analyze My Answer β Free3 free analyses per day. No sign-up required.