Database Change Management

Published date: April 15, 2024, Version: 1.0

Overview

DevOps Research and Assessment (DORA) highlights that database changes are often a major source of risk and delay when performing deployments. DORA’s research found that integrating database work into the software delivery process positively contributes to continuous delivery.

Teams that do well at continuous delivery store their database changes as scripts in version control and manage these changes in the same way they manage production application changes. Furthermore, when changes to the application require database changes, these teams discuss them with the people responsible for the production database, and ensure the engineering team has visibility into the progress of pending database changes.

How to implement database change management

Establish effective communication of database changes

  • Making sure everybody has visibility into the progress of changes is also crucial so that teams, including DBAs, can understand which changes are coming up, their testing status, and which schema changes have made it to the various production and non-production shared databases

Keeping all database schema changes in version control

  • Together with the application code the schema belongs to;

Treat all database schema changes as migrations

  • A widely used pattern for versioning database changes is to capture every change as a migration script which is kept in version control, as shown in the following diagram. Each migration script has a unique sequence number, so that you know in which order to apply migrations.

Zero-downtime database changes

  • Many organizations schedule downtime for their services when making database schema changes due to the need to coordinate them with application deployments, or due to database table locking during the execution of such changes.
  • Use an online schema migration framework
  • Decouple database changes and application changes
  • Design and implement a data partitioning and archiving strategy.
  • Continuous delivery aims to eliminate downtime for deployments, so here are some strategies to make database schema changes without downtime:

Adoption expectations

System Components  MVP MVP+

Database change process is documented

+

+

Database schema is stored in VCS

+

+

Adopt recommended database schema migration tool

+

+

Establish communication between Engineering and DBA teams

+

+

Integrate database changes automation into CI/CD process

 

+

Implement zero downtime approach

 

+

Tools

Functionality Tool Name

Database Schema Management Tools

Entity Framework (.net ORM),
Hibernate (Java ORM),
Liquibase,
Microsoft SQL Database Projects

 

Roles

Name  Responsibilities 

Solution Architect

Design solution and propose approaches to avoid any manual database changes

System Architect

Design solution and propose approaches to avoid any manual database changes

Developer

Version control all database changes

Build Engineer

Develop automated database migration pipeline

System Engineer

Configure databases and related tools to support full traceability and version control capabilities