|
1 | 1 | --- |
2 | 2 | title: What is Database Change Management (DCM)? |
3 | 3 | author: Tianzhou |
4 | | -updated_at: 2022/12/09 09:00:00 |
5 | | -feature_image: /content/blog/what-is-database-change-management/change-path.webp |
| 4 | +updated_at: 2026/04/15 12:00:00 |
| 5 | +feature_image: /content/blog/what-is-database-change-management/banner.webp |
6 | 6 | tags: Explanation |
7 | 7 | featured: true |
8 | | -description: What is Database Change Management (DCM), the challenges and solution. |
| 8 | +description: 'Database Change Management (DCM) explained — definition, why it is hard, the ideal workflow, state-based vs change-based approaches, tool evaluation criteria, and how it fits into DevOps.' |
9 | 9 | keypage: true |
10 | 10 | --- |
11 | 11 |
|
12 | | -This is a series of articles about database change management (DCM): |
| 12 | +Related reading: |
13 | 13 |
|
14 | | -1. What is Database Change Management? (this one) |
| 14 | +1. What is Database Change Management? (this article) |
15 | 15 | 1. [Top Database Change Management Tools](/blog/top-database-change-management-tools) |
| 16 | +1. [State-based vs. Change-based Database Version Control](/blog/database-version-control-state-based-vs-migration-based) |
| 17 | +1. [Database Version Control Best Practice](/blog/database-version-control-best-practice) |
| 18 | +1. [The 6 Levels of Database Automation](/blog/database-automation-levels) |
16 | 19 |
|
17 | | ---- |
| 20 | +## Definition |
| 21 | + |
| 22 | +**Database Change Management (DCM)** is the discipline of proposing, reviewing, deploying, and auditing every change that touches a database — both structure and data — the same way code changes flow through version control and CI/CD. |
| 23 | + |
| 24 | +For relational databases, SQL is the medium. Changes fall into three categories: |
| 25 | + |
| 26 | +- **DDL** (Data Definition Language) — schema: `CREATE`, `ALTER`, `DROP`. |
| 27 | +- **DML** (Data Manipulation Language) — data: `INSERT`, `UPDATE`, `DELETE`. |
| 28 | +- **DCL** (Data Control Language) — permissions: `GRANT`, `REVOKE`. |
| 29 | + |
| 30 | +Most DCM tools focus on DDL. Mature DCM covers all three — because the outage risk, data risk, and compliance risk each live in a different category, and you can't manage one without touching the others. |
| 31 | + |
| 32 | +In practice, those changes don't come from one place. Application servers, cron jobs, ad-hoc scripts, and humans on the CLI all converge on the same database: |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | +That's what DCM has to wrangle. |
| 37 | + |
| 38 | +## Why It's Hard |
| 39 | + |
| 40 | +Writing a migration is easy. Shipping it safely across a team, across environments, across time is hard. The recurring failure modes: |
| 41 | + |
| 42 | +### 1. Uncoordinated changes |
| 43 | + |
| 44 | +Two developers rename the same column in different branches. A DBA adds an index in production directly. An application deploys a migration while another service is mid-read. |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | +Without a single place where every change is proposed and serialized, you get [schema conflicts, lost changes, and outages](/blog/fault-in-schema-migration-outage). |
| 49 | + |
| 50 | +### 2. Environment drift |
| 51 | + |
| 52 | +Dev, staging, and production drift apart. A column exists in dev but not in prod. A constraint is active in staging but disabled in prod because "it was slow." The next migration assumes a shape that only exists in one environment, and the deployment to the other two breaks. |
| 53 | + |
| 54 | +### 3. Irreversible mistakes in production |
| 55 | + |
| 56 | +`DROP TABLE` ran against the wrong database. A `DELETE` without a `WHERE` clause landed before anyone caught it. A migration locked a 50M-row table for 20 minutes during peak traffic. Each of these is a specific failure with a specific prevention — but only if changes go through review before they reach production. |
| 57 | + |
| 58 | +### 4. Compliance and audit gaps |
| 59 | + |
| 60 | +A SOC 2 auditor asks: "Who approved the schema change that touched the PII table on March 14, and what was the SQL?" If the answer lives in Slack screenshots, Jira tickets, and a DBA's memory, you have a problem. Audit trails need to be automatic, tamper-evident, and queryable. |
| 61 | + |
| 62 | +### 5. Rollback complexity |
| 63 | + |
| 64 | +Most DDL is not cleanly reversible — `DROP COLUMN` loses the data; `ALTER TABLE` doesn't have a built-in undo. A change made in a hurry without a [rollback plan](/blog/database-rollback) becomes a recovery project. DML changes are worse because you have to reconstruct state, not just schema. |
| 65 | + |
| 66 | +### 6. Access sprawl |
| 67 | + |
| 68 | +The `root` credential is in five config files. Seven developers have direct prod access "for emergencies." No one knows who ran the last hand-typed `UPDATE`. [Access control and query control](/blog/how-to-manage-database-access-control) need to be part of DCM, not a separate track. |
| 69 | + |
| 70 | +## The Ideal Workflow |
| 71 | + |
| 72 | +Modern DCM treats database changes like code changes: |
| 73 | + |
| 74 | + |
18 | 75 |
|
19 | | -Database Change Management (DCM) is a critical part of maintaining and managing a database. It involves |
20 | | -tracking and controlling changes to the database, including both the structure of the database (such |
21 | | -as the tables, columns, and relationships between data) and the data itself. For the relational |
22 | | -database systems (RDBMS), SQL is the medium to instruct database changes. The structure change |
23 | | -is dictated via Data Definition Language (DDL), while the data change is dictated via Data |
24 | | -Manipulation Language (DML). |
| 76 | +1. **Propose** — a developer writes the SQL (or generates it from a schema definition) and submits it as a change request — the database equivalent of a pull request. |
25 | 77 |
|
26 | | -## Ideal Process |
| 78 | +2. **Automated review** — the system lints the SQL against a rule set: naming conventions, destructive operations without backups, missing indexes, `UPDATE` without `WHERE`, etc. Modern [SQL review](/blog/is-sql-review-necessary) engines carry 200+ rules and catch the common mistakes before a human looks at the change. |
27 | 79 |
|
28 | | -The process of database change management typically includes several key steps: |
| 80 | +3. **Human review** — a DBA or platform engineer reviews the intent, the business impact, and anything the linter can't catch (e.g., "does this migration preserve the invariant the finance team depends on?"). |
29 | 81 |
|
30 | | -- **Identifying the need for a change to the database.** This could be triggered by a change in |
31 | | - business requirements, a new feature being added to the system, or a problem with the current |
32 | | - database structure or data. |
| 82 | +4. **Approval** — depending on risk, the change routes through a [custom approval flow](https://docs.bytebase.com/change-database/approval) — e.g., DDL on prod requires DBA + manager sign-off; DML touching PII requires security review. |
33 | 83 |
|
34 | | -- **Documenting the change.** This typically involves creating a detailed description of the change, |
35 | | - including why it is needed and how it will be implemented. This documentation is important for |
36 | | - ensuring that all stakeholders understand the change and can provide input or feedback. |
| 84 | +5. **Staged rollout** — the change deploys through environments in order: dev → staging → prod. Each stage is a checkpoint. Cross-database or cross-tenant rollouts run as a single batch with canary support. |
37 | 85 |
|
38 | | -- **Implementing the change.** Developers typically implement the change and test it in the dev |
39 | | - environment. This is to ensure that logically it works as intended. This can involve running test |
40 | | - cases or simulations to confirm that the change has the desired effect. |
| 86 | +6. **Audit** — every action — who proposed, who approved, what SQL ran, when, against which database — is recorded immutably. The audit log is the answer to every compliance question. |
41 | 87 |
|
42 | | -- **Reviewing and approving the change.** Once the Developer has tested the change, she will submit |
43 | | - the change for review. The change is typically reviewed by a team of database administrators (DBA) |
44 | | - or other experts who assess its impact on the database and determine whether it should be approved. |
| 88 | +7. **Rollback plan** — for any change beyond trivial, the rollback SQL is written and stored alongside the forward migration. |
45 | 89 |
|
46 | | -- **Deploying the change to production.** Once the change has been approved, it will be deployed to |
47 | | - production. This is often carried out by DBA. This can involve making changes to the database |
48 | | - structure or data, and may require coordinating with other team members or systems to ensure a |
49 | | - smooth transition. |
| 90 | +## State-based vs. Change-based |
50 | 91 |
|
51 | | -- **Finalizing the change.** After the change has been tested and implemented, it is important to |
52 | | - finalize it. This can involve updating the database documentation and creating records of the |
53 | | - change for future reference. It may also involve coordinating with other team members or systems |
54 | | - to ensure that the change is fully integrated into the overall database system. |
| 92 | +Two philosophies for how changes are expressed: |
55 | 93 |
|
56 | | -Overall, the goal of database change management is to ensure that changes to the database are made |
57 | | -in a controlled and coordinated way. This can help to avoid errors and improve the reliability of |
58 | | -the database. |
| 94 | +**Change-based (imperative)** — you write the migration SQL yourself: `ALTER TABLE orders ADD COLUMN status VARCHAR(20);`. Each change is a numbered, ordered file. Flyway, Liquibase, and Bytebase's default workflow use this model. |
59 | 95 |
|
60 | | -## Challenges |
| 96 | +**State-based (declarative)** — you define what the schema should look like, and the tool computes the diff and generates the migration automatically. Atlas, Schemachange, and Bytebase's [state-based workflow for PostgreSQL](https://docs.bytebase.com/gitops/state-based-workflow/overview) use this model. |
61 | 97 |
|
62 | | -There are several challenges that can arise when managing changes to a database. Some common |
63 | | -challenges include: |
| 98 | +| | Change-based | State-based | |
| 99 | +|---|---|---| |
| 100 | +| Source of truth | Ordered migration files | Desired schema (HCL, SQL, ORM) | |
| 101 | +| Data migrations | Natural fit — you write the SQL | Awkward — declarative models describe shape, not data movement | |
| 102 | +| Review diff | The migration file itself | Tool-generated SQL (must be reviewed before apply) | |
| 103 | +| Drift detection | Hard — requires reconciling applied migrations with live schema | Built in — diff against desired state | |
| 104 | +| Rollback | Explicit `DOWN` migrations (if you wrote them) | Re-apply previous state | |
64 | 105 |
|
65 | | -- **Ensuring that changes are made in a controlled and coordinated way.** This can be difficult, |
66 | | - especially in large organizations where multiple teams and different applications may be making |
67 | | - changes to the database at the same time. |
| 106 | +Most real teams run a [hybrid](/blog/database-version-control-state-based-vs-migration-based) — state-based for greenfield schema work, change-based for data migrations, conditional backfills, and anything stateful. |
68 | 107 |
|
69 | | -  |
| 108 | +## How to Evaluate a DCM Tool |
70 | 109 |
|
71 | | -- **Avoiding errors and inconsistencies in the database.** Changes to the database can have |
72 | | - unintended consequences, such as introducing errors or inconsistencies into the data. This can be |
73 | | - difficult to detect and can impact the reliability of the database. |
| 110 | +The market has many tools — desktop clients with migration features, CLI migration engines, full platforms. When picking one, look at: |
74 | 111 |
|
75 | | -- **Managing complex or interdependent changes.** Some changes to the database may be complex, |
76 | | - involving multiple tables or data sets that are interdependent. This can make it difficult to |
77 | | - manage the changes effectively, and may require coordination between multiple teams or systems. |
| 112 | +1. **SQL review depth** — how many rules, how configurable per environment, engine-specific coverage. A tool that catches "missing index on a foreign key" saves more incidents than one that only lints syntax. |
78 | 113 |
|
79 | | -- **Keeping track of multiple versions of the database.** As changes are made to the database, |
80 | | - multiple versions of the database may exist at different stages of the change process. This can |
81 | | - make it difficult to keep track of the changes and ensure that the correct version of the database |
82 | | - is being used. |
| 114 | +2. **Approval flow flexibility** — can you define rules like "DDL on prod requires DBA approval, DML touching PII requires security approval"? Or is it just "one approver clicks yes"? |
83 | 115 |
|
84 | | -## Solution |
| 116 | +3. **Multi-environment and multi-tenant rollout** — can a single change deploy across dev → staging → prod with gates? Across 500 tenant databases with canary? |
85 | 117 |
|
86 | | -Adopting database change management software is a natural step to overcome those challenges. |
87 | | -Since this is a long standing issue, industries have already developed many solutions over the |
88 | | -years. Among them, Bytebase stands out in several ways: |
| 118 | +4. **GitOps integration** — does committing SQL to Git automatically create a reviewable change? Does the SQL review result show up in the PR? |
89 | 119 |
|
90 | | -1. Have an all-in-one GUI to manage the database change lifecycle. With Bytebase, organization can |
91 | | - control all [Human to Database](/blog/how-to-manage-database-access-control#human-to-database) |
92 | | - access points in a single place. |
| 120 | +5. **Access control and data masking** — DCM that ignores DCL is only doing half the job. Can it enforce role-based access, [dynamic data masking](https://docs.bytebase.com/security/data-masking/overview), and just-in-time data access? |
93 | 121 |
|
94 | | - |
| 122 | +6. **Audit log** — is every action recorded with user, time, SQL, and target? Is it queryable and exportable? |
95 | 123 |
|
96 | | -2. Embrace the latest industry methdology and trends. Bytebase brings DevOps into Database, has |
97 | | - designed a `Project` model to separate the infrastructure from the application development. |
| 124 | +7. **Rollback support** — can the tool store and execute rollback SQL? Can it detect and flag [schema changes made outside](/blog/database-version-control-best-practice) the tool? |
98 | 125 |
|
99 | | - |
| 126 | +8. **Engine coverage** — not just "does it connect" but "does it understand engine-specific syntax and best practices" (e.g., MySQL online DDL, PostgreSQL `CONCURRENTLY`, Oracle invisible indexes). |
100 | 127 |
|
101 | | -3. Use the state-of-the-art tech stack. Bytebase is built with the modern tech stack for the cloud |
102 | | - era. Bytebase is the [only Database CI/CD solution acknowledged by CNCF](https://landscape.cncf.io/?selected=bytebase) |
103 | | - and is gaining momentum among other incumbents. |
| 128 | +9. **Deployment model** — self-hosted for air-gapped environments? Cloud for fast onboarding? Both? |
| 129 | + |
| 130 | +10. **Developer experience** — GUI for DBAs, CLI/API for automation, IDE integration for developers. The tool gets used more when friction is low. |
| 131 | + |
| 132 | +For a broader breakdown, see [Top Database Change Management Tools](/blog/top-database-change-management-tools). |
| 133 | + |
| 134 | +## DCM and DevOps |
| 135 | + |
| 136 | +Classical DevOps moved application deployment from ticket-driven ops to code-driven pipelines. DCM does the same for databases. The [6 levels of database automation](/blog/database-automation-levels) are the maturity ladder: |
| 137 | + |
| 138 | +- **Level 0** — SSH into prod, run SQL by hand. |
| 139 | +- **Level 1** — SQL files in Git, but applied manually. |
| 140 | +- **Level 2** — migration tool runs on deploy, no review. |
| 141 | +- **Level 3** — changes go through review + approval before deploy. |
| 142 | +- **Level 4** — full platform: review, approval, GitOps, multi-env rollout, audit, access control, masking. |
| 143 | +- **Level 5** — autonomous operation with policy-as-code, drift detection, and automatic remediation. |
| 144 | + |
| 145 | +Most teams sit at Level 2. The gap from Level 2 to Level 4 is where DCM earns its keep — that's where outages stop happening on Fridays and auditors stop asking uncomfortable questions. |
| 146 | + |
| 147 | +## How Bytebase Approaches DCM |
| 148 | + |
| 149 | +[Bytebase](https://www.bytebase.com/) is a database DevSecOps platform built around this workflow: |
| 150 | + |
| 151 | + |
| 152 | + |
| 153 | +- **Change as issue** — every DDL/DML change is proposed as an issue (the database equivalent of a PR). |
| 154 | +- **SQL review** — 200+ engine-specific rules, configurable per environment. |
| 155 | +- **Custom approval flow** — route changes through rules based on environment, change type, or data sensitivity. |
| 156 | +- **Multi-environment rollout** — single issue, staged deployment across dev → staging → prod. |
| 157 | +- **GitOps** — GitHub, GitLab, Bitbucket, Azure DevOps — SQL files in Git become reviewable change issues. |
| 158 | +- **Access control + data masking** — workspace/project roles, column-level dynamic masking, just-in-time access. |
| 159 | +- **Audit log** — every action, every user, every target, queryable and exportable. |
| 160 | +- **23 engines** — 9 RDBMS, 6 NoSQL, 7 data warehouses, plus Elasticsearch. |
| 161 | + |
| 162 | +It's the [only database change management solution acknowledged by CNCF](https://landscape.cncf.io/?selected=bytebase), with growing adoption over the incumbents: |
| 163 | + |
| 164 | + |
| 165 | + |
| 166 | +## FAQ |
| 167 | + |
| 168 | +### Is DCM the same as schema migration? |
| 169 | + |
| 170 | +No. Schema migration is one part of DCM — specifically the DDL part. DCM also covers DML (data changes), DCL (permissions), review workflow, audit, and access control. A migration tool like Flyway or Liquibase handles schema migration. A DCM platform handles the full lifecycle. |
| 171 | + |
| 172 | +### Do I need DCM if my team is small? |
| 173 | + |
| 174 | +If one person writes and deploys every database change and no compliance auditor is asking questions, probably not. The moment a second person can change production — or the moment you need an audit trail — you need DCM. Starting early is cheaper than retrofitting. |
| 175 | + |
| 176 | +### Is DCM just "database DevOps"? |
| 177 | + |
| 178 | +Overlapping but not identical. Database DevOps is the broader cultural and tooling shift toward treating databases like code. DCM is the specific discipline inside that shift focused on proposing, reviewing, deploying, and auditing changes. DCM is the "change review + approval + rollout + audit" slice of database DevOps. |
| 179 | + |
| 180 | +### Can I do DCM with just Git and CI? |
| 181 | + |
| 182 | +To a degree — you can store SQL files in Git, have them reviewed in PRs, and run a migration tool on deploy. That gets you to Level 2–3 in the automation ladder. What Git + CI can't give you: engine-specific SQL review, runtime access control, data masking on query results, dynamic data access requests, or an audit trail that covers direct database connections (not just CI-driven changes). |
| 183 | + |
| 184 | +### What's the difference between state-based and change-based? |
| 185 | + |
| 186 | +Change-based: you write the migration SQL (ordered files). State-based: you declare the desired schema and the tool generates the migration. State-based is cleaner for schema work; change-based is necessary for data migrations. Most teams use both. See [State-based vs. Change-based](/blog/database-version-control-state-based-vs-migration-based). |
| 187 | + |
| 188 | +### Does DCM cover data changes or just schema? |
| 189 | + |
| 190 | +Both. A mature DCM platform treats DML changes with the same review rigor as DDL — a `DELETE FROM orders WHERE ...` that runs against production is as consequential as a `DROP COLUMN`. Review, approval, audit, and rollback apply equally. |
| 191 | + |
| 192 | +--- |
104 | 193 |
|
105 | | - |
| 194 | +Further reading: |
| 195 | + |
| 196 | +- [Database Version Control](/blog/database-version-control) |
| 197 | +- [Top Database Change Management Tools](/blog/top-database-change-management-tools) |
| 198 | +- [State-based vs. Change-based Database Version Control](/blog/database-version-control-state-based-vs-migration-based) |
| 199 | +- [Database Version Control Best Practice](/blog/database-version-control-best-practice) |
| 200 | +- [Database Rollback](/blog/database-rollback) |
| 201 | +- [How to Build a CI/CD Pipeline for Database Schema Migration](/blog/how-to-build-cicd-pipeline-for-database-schema-migration) |
| 202 | +- [The 6 Levels of Database Automation](/blog/database-automation-levels) |
| 203 | +- [Database Multi-Environment Deployments](/blog/database-multi-environment-deployments) |
| 204 | +- [How to Manage Database Access Control](/blog/how-to-manage-database-access-control) |
| 205 | +- [Database as Code](/blog/database-as-code) |
0 commit comments