{"id":6854,"date":"2020-08-01T08:06:27","date_gmt":"2020-08-01T08:06:27","guid":{"rendered":"https:\/\/test.simple-talk.com\/uncategorized\/how-mature-is-your-database-change-management-process\/"},"modified":"2020-08-20T13:00:34","modified_gmt":"2020-08-20T13:00:34","slug":"how-mature-is-your-database-change-management-process","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/blogs\/how-mature-is-your-database-change-management-process\/","title":{"rendered":"How Mature is Your Database Change Management Process?"},"content":{"rendered":"<p>How do you get your database schema changes live on your production system? As your team of developers and DBAs work on changes to the database to support your business-critical applications, how do updates wend their way through dev environments, possibly to QA, hopefully through pre-production and eventually to production in a controlled, reliable and repeatable way?<\/p>\n<p>In this article, I describe a model we use to try and understand the different stages that customers go through as their database change management processes mature, from the very basic and manual, through to advanced continuous delivery practices. I also provide a simple chart that will help you determine how mature your process is.<\/p>\n<p>This method of managing changes to the database \u2013 which all of us who have worked in application\/database development have had to deal with in one form or another \u2013 is sometimes known as Database Change Management. And it\u2019s a difficult process, often painfully so.<\/p>\n<p>Some developers take the approach of: <em>\u201cI\u2019ve no idea how my changes get live \u2013 I just write the stored procedures and add columns to the tables. It\u2019s someone else\u2019s problem to get this stuff live. I think we\u2019ve got a DBA somewhere who deals with it \u2013 I don\u2019t know, I\u2019ve never met him\/her\u201d<\/em>.<\/p>\n<p>I know I used to work that way because I assumed that making the updates to production was a trivial task \u2013 how hard can it be? Pause the application for half an hour in the middle of the night, copy over the changes to the app and the database, and switch it back on again. Voila!<\/p>\n<p>But somehow it never seemed that easy. And it certainly never was that easy for database changes. Why? Because you can\u2019t just overwrite the old database with the new version. Databases have a state \u2013 more specifically, 4Tb of critical data built up over the last 12 years of running your business. If your quick hotfix happens to accidentally delete that 4Tb of data, then you\u2019ll be looking for a new role pretty quickly after the failed release.<\/p>\n<p>There are a lot of other reasons why a properly managed database change management process is important for organizations, besides job security, not least:<\/p>\n<ol>\n<li><strong>Frequency of releases.<\/strong> Many business managers are feeling the pressure to get functionality out to their users sooner, quicker and more reliably. A really good book which I highly recommend, <a href=\"https:\/\/www.amazon.co.uk\/Accelerate-Software-Performing-Technology-Organizations\/dp\/1942788339\"><strong>Accelerate<\/strong><\/a> by Nicole Forsgren, Jez Humble and Gene Kim, shows how companies can measure \u2013 and improve &#8211; software delivery performance using four key metrics. (Our software development teams at Redgate use the same metrics and it works extremely well.)<\/li>\n<li><strong>Auditing and compliance.<\/strong> The old SOX and HIPAA regulations have now been joined by other compliance frameworks like the GDPR in the EU and the CCPA in the US. One common thread is that they all demand companies implement proper processes for managing changes to their databases. That applies whether they\u2019re managing schema changes, making sure the data itself is being looked after correctly, or introducing other mechanisms that provide an audit trail of changes.<\/li>\n<\/ol>\n<p>We\u2019ve found, at Redgate that we have a very wide range of customers using every possible form of database change management imaginable. Everything from: <em>\u201cNothing \u2013 I just fix the schema on production from my laptop when things go wrong, and write it down in my notebook\u201d<\/em>, to: <em>\u201cA full Continuous Delivery process \u2013 any change made by a dev gets checked in and recorded, fully tested (including performance tests) before a (tested) release is made available to our Release Management system, ready for live deployment!\u201d<\/em>. And everything in between of course.<\/p>\n<p>Because of the vast number of customers using so many different approaches, we found ourselves struggling to keep on top of what everyone was doing \u2013 grappling to identify patterns in customer behavior. This is useful for us, because we want to try and fit the products we have to different needs \u2013 different products are relevant to different customers and we waste everyone\u2019s time (most notably, that of our customers) if we suggest products that aren\u2019t appropriate for them.<\/p>\n<p>If someone visited a sports store, looking to embark on a new fitness program, and the assistant suggested the latest $10,000 multi-gym, complete with multiple weights mechanisms, dumb-bells, pull-up bars and so on, then the store is likely to lose that customer. All he needed was a pair of running shoes!<\/p>\n<p><strong>Introducing the Customer Maturity Framework<\/strong><\/p>\n<p>To solve this issue and attempt to simplify how we understand our customers and our offerings, we built a model. This is an attempt at classifying our customers into a \u2018Customer Maturity Framework\u2019 as we rather grandly term it, which somehow simplifies our understanding of what our customers are doing.<\/p>\n<p>The great statistician, <a href=\"https:\/\/en.wikipedia.org\/wiki\/George_E._P._Box\">George Box<\/a> (amongst other things, the \u2018Box\u2019 in the Box-Jenkins time series model) gave us the famous quote: <em>\u201cEssentially all models are wrong, but some are useful.\u201d<\/em><\/p>\n<p>We\u2019ve taken this quote to heart with our own model \u2013 we know it\u2019s a gross over-simplification of the real world of how users work with complex legacy and new database developments. Almost nobody precisely fits in to one of our categories, but we hope it\u2019s useful and interesting.<\/p>\n<p>There are actually a number of similar models that have existed for a long time for more general application delivery like these from <a href=\"http:\/\/info.thoughtworks.com\/rs\/thoughtworks2\/images\/continuous_delivery_a_maturity_assessment_modelfinal.pdf\">ThoughtWorks\/Forrester<\/a> and <a href=\"http:\/\/www.infoq.com\/articles\/Continuous-Delivery-Maturity-Model\">InfoQ<\/a>. Initially we tried just taking these models and replacing the word \u2018application\u2019 for \u2018database\u2019, but we hit a problem. From talking to our customers we know that users are far less further down the road of mature database change management than they are for application development.<\/p>\n<p>As a simple example, no application developer who wants to keep his\/her job would develop an application for an organization without source controlling that code. Sure, they might not be using an advanced Gitflow branching methodology but they\u2019ll certainly be making sure their code gets managed in a repo somewhere with all the benefits of history, auditing and so on. This often isn\u2019t the case for the database. A very large segment of the people we speak to have no source control set up for their databases whatsoever, even at the most basic level like keeping change scripts in a source control system somewhere. By the way, if this is you, one of the most viewed posts on the Redgate blog is <a href=\"https:\/\/www.red-gate.com\/blog\/database-devops\/introduction-to-sql-source-control\">An introduction to SQL Source Control<\/a>, which explains what it is, what it does, and the advantages it brings to day-to-day development.<\/p>\n<p>This difference in maturity in database change management is the same as you move into areas such as continuous integration (common amongst app developers, relatively rare for database developers), and automated release management (becoming increasingly common amongst app developers, growing for the database).<\/p>\n<p>So, when we created the model we started from scratch and biased the levels of maturity towards what we actually see amongst our customers. But what are these stages? And what level are you? The table below describes our definitions for four levels of maturity \u2013 Baseline, Beginner, Intermediate and Advanced. As I say, this is a model \u2013 you won\u2019t fit any of these categories perfectly, but hopefully one will ring true more than others.<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<p><strong>Baseline<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<ul>\n<li>Work directly on live databases<\/li>\n<li>Sometimes work directly in production<\/li>\n<li>Generate manual scripts for releases. Sometimes use a product like SQL Compare or similar to do this<\/li>\n<li>Any tests that we might have are run manually<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>Beginner<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<ul>\n<li>Have some ad-hoc DB version control such as manually adding upgrade scripts to a version control system<\/li>\n<li>Attempt is made to keep production in sync with development environments<\/li>\n<li>There is some documentation and planning of manual deployments<\/li>\n<li>Some basic automated DB testing in process<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>Intermediate<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<ul>\n<li>The database is fully version-controlled with a product like <a href=\"http:\/\/www.red-gate.com\/products\/sql-development\/sql-source-control\/\">Redgate SQL Source Control<\/a> or SSDT<\/li>\n<li>Database environments are managed<\/li>\n<li>Production environment schema is reproducible from the source control system<\/li>\n<li>There are some automated tests<\/li>\n<li>Have looked at using migration scripts for difficult database refactoring cases<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>Advanced<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<ul>\n<li>Using continuous integration for database changes<\/li>\n<li>Build, testing and deployment of DB changes carried out through a proper database release process<\/li>\n<li>Fully automated tests<\/li>\n<li>Production system is monitored for fast feedback to developers<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Where do you go next on your database change management journey?<\/strong><\/p>\n<p>Does this model reflect your team at all? Where are you on this journey? We\u2019d be very interested in knowing how you get on. We\u2019re doing a lot of work at the moment, trying to help people progress through to continuous delivery for the database, often as part of their DevOps transformation.<\/p>\n<p>For example, if you\u2019re currently not source controlling your database, then it might be worth <a href=\"https:\/\/www.red-gate.com\/blog\/database-devops\/database-version-control-3\">exploring the business advantages<\/a> of doing so. If you\u2019re already source controlling your database, what about the next steps \u2013 continuous integration and automated release management?<\/p>\n<p>To help understand these issues, there\u2019s a <a href=\"https:\/\/www.simple-talk.com\/sql\/database-administration\/database-delivery-patterns-and-practices\/?utm_source=simpletalk&amp;utm_medium=publink&amp;utm_campaign=databasedelivery&amp;utm_content=howmature\">library here on Simple-Talk<\/a> to help you get up and running with the tools you need to progress with database change management. All feedback is welcome and it would be great to hear where you find yourself on this journey.<\/p>\n<p><strong><em>This post was originally published in 2014 and has remained relevant \u2013 and popular \u2013 ever since. It was reviewed in August 2020 to ensure the content is up-to-date and still of value to Simple Talk readers.<\/em><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How do you get your database schema changes live on your production system? As your team of developers and DBAs work on changes to the database to support your business-critical applications, how do updates wend their way through dev environments, possibly to QA, hopefully through pre-production and eventually to production in a controlled, reliable and&#8230;&hellip;<\/p>\n","protected":false},"author":19634,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2],"tags":[],"coauthors":[19701],"class_list":["post-6854","post","type-post","status-publish","format-standard","hentry","category-blogs"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/6854","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/19634"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=6854"}],"version-history":[{"count":50,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/6854\/revisions"}],"predecessor-version":[{"id":87926,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/6854\/revisions\/87926"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=6854"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=6854"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=6854"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=6854"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}