Data Modeling easy
What is a 'Schema Migration'?
- A A version-controlled set of scripts used to transform the database schema (e.g., adding columns) in a reliable and repeatable manner.
- B The physical process of transferring a primary database node from an on-premise data center to a managed cloud-native host.
- C A low-level system process that converts existing JSON documents into a strictly formatted XML structure for cross-compatibility.
- D The automated daily background task of creating a full, incremental backup of the database to ensure long-term data durability.
Answer: A. A version-controlled set of scripts used to transform the database schema (e.g., adding columns) in a reliable and repeatable manner.
Schema migrations treat database evolution as a component of the codebase. Tools like Flyway or Liquibase allow developers to write migration scripts that are applied in a strict order across all environments (development, staging, production). This ensures that the database structure always matches the requirements of the application code, promoting reproducibility and safety.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- When modeling a Distributed Transaction using the Saga Pattern (Choreography or Orchestration), what type of consistency do you achieve?
- Which practice prevents SQL Injection attacks?
- What is 'Bi-Temporal' data modeling (e.g., in SQL:2011 standard)?
- Adding an Index to a database column generally improves Read performance. What is the negative trade-off?
- Log Systems Merge (LSM) Trees (used in RocksDB, Cassandra) optimize for fast writes. What is their primary downside regarding Disk I/O?
- What is the primary objective of normalizing a relational database schema (e.g., to 3NF)?