Introduction to schema migrations

submited by
Style Pass
2021-07-27 17:30:09

Let us talk about schema migrations.   To ensure that we cover the entire design space we need to carefully introduce our main abstractions.  Let’s use the following three basic concepts that seem to cover almost everything that is stored in databases:

Anchors, attributes and links together cover the logical schema.  They could be implemented on a physical level in many different ways.  The most straightforward way is tables and columns, but there are several alternative implementations (e.g. key/value storage, “schemaless” approaches, JSON, etc.), including non-relational storage such as S3 or filesystems.

Note that a single logical object can have two or even more physical implementations simultaneously.  Such a situation most commonly arises during storage refactoring.

We will discuss physical level only as much as necessary: there is too much variability and technical details that distracts from the essence of logical schema and its migrations.  But we’re going to talk a lot about the code that works with that data, and the software lifecycles that accompany database migrations.

Leave a Comment