🧠 Second Brain

Search

Search IconIcon to open search

Schema Modification Operators (SMOs)

Last updated Feb 16, 2025

Schema Modification Operators (SMOs) are formal, operations that specify how to transform one database schema into another. Think of them as a standardized vocabulary or set of commands for making schema changes.

Here are some common examples of SMOs:

  1. Adding or dropping a table
  2. Adding, renaming, or dropping a column
  3. Merging two tables into one
  4. Splitting one table into two
  5. Moving a column from one table to another
  6. Changing a column’s data type

The key benefits of using SMOs are:

For example, instead of making ad-hoc schema changes, a team might define a series of SMOs like:

1
2
3
ADD COLUMN customer.email VARCHAR(255);
RENAME COLUMN customer.phone TO customer.phone_number;
MERGE TABLE address INTO customer;

This systematic approach makes schema evolution more manageable, especially in large databases where changes need to be carefully controlled and documented.


Origin: Schema Evolution vs. Data Contracts vs. NoSQL
References: Schema Evolution, Liquibase
Created 2025-02-16