InterviewStack.io LogoInterviewStack.io

Data Migration and Consistency Questions

Plan and execute data migrations while preserving correctness and availability. Topics include zero downtime migration techniques, schema evolution patterns, backward and forward compatibility, dual writes and shadow writes, incremental and bulk migration strategies, data validation and reconciliation, canary migrations, rollbacks and fallback plans, and how to minimize user impact during transitions. Understand trade offs between consistency and speed of migration and techniques to detect and correct drift after migration.

HardTechnical
0 practiced
Write a high-concurrency safe SQL MERGE (or equivalent for your chosen RDBMS) to perform an idempotent upsert for a `users` table with columns (id PK, email, last_seen_ts). Discuss how your statement prevents race conditions under concurrent workers and how you would handle deadlocks or retries.
HardTechnical
0 practiced
Case: You must migrate an authentication database from bcrypt to argon2 for password hashing. Users must be able to log in during and after the migration. Provide a rollout plan that preserves security, supports gradual rehashing, and includes contingency if the new scheme introduces issues.
MediumSystem Design
0 practiced
Design a migration strategy to move 50 million user records from a single monolithic relational database into a sharded cluster without taking the application offline. The system requires strong read-after-write guarantees for profile updates. Outline architecture components, cutover steps, data consistency strategies, and how you would coordinate the cutover with minimal risk.
EasyTechnical
0 practiced
List common tools and platforms you would consider for a large-scale data migration (on-prem → cloud or between cloud DBs). For each tool name a primary use-case and one limitation. Include at least 6 items (e.g., AWS DMS, Debezium, Flyway).
MediumTechnical
0 practiced
Write an SQL pattern (ANSI SQL) to detect rows where a computed hash in the source differs from the computed hash in the target. Use the sample schema: customers(id, name, email, updated_at). Include steps to avoid scanning entire tables repeatedly and how to leverage indexes or incremental checks.

Unlock Full Question Bank

Get access to hundreds of Data Migration and Consistency interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.