SlideShare a Scribd company logo
Database Change Management One solution to an often  complex problem Kevin Hurwitz Headspring Systems [email_address]
The Problem Most significant business applications rely on at least one relational database for persisting data As new features are developed, database schema changes are often necessary – i.e. new tables, columns, views, and stored procedures Database schema changes and corresponding code changes must always be deployed together  While deploying software to a production environment, code files and libraries may usually be deleted or overwritten – Database files, however, must be intelligently manipulated so as not destroy vital business data
Staging Database Environment To ensure an application remains stable throughout the development lifecycle, a data-driven application must be deployed to at least two environments:  Production and Staging Database and corresponding code changes are applied and tested in the staging environment before being deployed to production Production Staging Production Users Developers Testers Salespeople Product Manager
Many Database Environments While two database environments represent the bare minimum, teams become more productive when certain roles and individuals have their own copy of the database  For example, a developer may make a change to the staging database which breaks the application and derails testers and salespeople Testers and salespeople may also want to work with their own set of data Production Demo Production Users Salespeople Developer #1 Developer #2 Tester #1 Tester #2
Database Synchronization Many development shops shy away from creating numerous database copies due to the challenge of keeping them all “in synch” An automated process  is needed to make the process of upgrading out-of-date databases simple Team members who maintain their own database will run the process on demand, while shared databases will be upgraded by an automated build Production Demo Production Users Salespeople Developer #1 Developer #2 Tester #1 Tester #2 Shared database upgraded by build/deployment process Individual database upgraded as needed
Incremental Schema Changes All database schemas can be thought of as a compilation of incremental changes made over time to accommodate new functionality To automate the process developers will record all database changes as SQL scripts which they will commit to the source control repository A program can then be run to execute all of the change scripts against databases which have not yet received the necessary updates As updates are applied to a database, the changes will be recorded in a table similar to the following:  4-24-07 5_Add_transaction_status_column.sql 4-21-07 4_Add_transaction_table.sql 4-18-07 3_Add_fax_number_column.sql 4-17-07 2_Add_e-mail_address_column.sql 4-27-07 6_Add_customer-transaction_view.sql 4-15-07 1_Create_Customer_Table.sql Date Change
Database Schema Change Lifecycle Time Developer creates an incremental SQL change script and tests the change locally Once the change is validated by unit tests, the script is checked into source control in a special location The automated build process kicks off, runs the upgrade process which executes the change script against the integration test database, and runs all unit tests to validate the change Once the build has succeeded, the tester can get the latest version of the software from source control and run the upgrade process via a GUI to upgrade her local database Once the build has been validated by QA,  automated build processes can be run to deploy the software to staging and production
Creating SQL Server Change Scripts Time Developer snapshots the current state of the database using Red Gate SQL Compare Developer makes all necessary changes to the database using SQL Server Management Studio Developers executes Red Gate SQL Compare to create a transactional change script for the change just made in SQL Server Management Studio The developer saves the Red Gate change script within the database script project under the “Update” folder The developer rebuilds the database from scratch, re-executes the database integration unit test, and commits the new script

More Related Content

PPTX
Why Micro Focus Chose Pulsar for Data Ingestion - Pulsar Summit NA 2021
PDF
Grokking TechTalk #33: High Concurrency Architecture at TIKI
PDF
Microservices
PPTX
검색엔진이 데이터를 다루는 법 김종민
PPT
Epoll - from the kernel side
PDF
Tecnologías para microservicios
PDF
Credit Agricole: Powering banking apps with the Elastic Stack
PDF
Reactive Programming for a demanding world: building event-driven and respons...
Why Micro Focus Chose Pulsar for Data Ingestion - Pulsar Summit NA 2021
Grokking TechTalk #33: High Concurrency Architecture at TIKI
Microservices
검색엔진이 데이터를 다루는 법 김종민
Epoll - from the kernel side
Tecnologías para microservicios
Credit Agricole: Powering banking apps with the Elastic Stack
Reactive Programming for a demanding world: building event-driven and respons...

What's hot (20)

PDF
REST API Development with Spring
PDF
C# Game Server
PDF
모바일 메신저 아키텍쳐 소개
PDF
REST APIs with Spring
PDF
MongoDB World 2019: Becoming an Ops Manager Backup Superhero!
KEY
Introduction to memcached
PDF
Intro to Network Automation
PPTX
Apache kafka
PPSX
SOLID Principles and The Clean Architecture
PPTX
PDF
Introduction to Redis
PPTX
Clean architecture
PPTX
Microservices Platform with Spring Boot, Spring Cloud Config, Spring Cloud Ne...
PDF
Simplify and Scale Data Engineering Pipelines with Delta Lake
PDF
[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버
PPTX
Mastering DevOps With Oracle
PPTX
Journey of saga pattern in microservice architecture
PDF
Developing Real-Time Data Pipelines with Apache Kafka
PDF
Akka.NET 으로 만드는 온라인 게임 서버 (NDC2016)
REST API Development with Spring
C# Game Server
모바일 메신저 아키텍쳐 소개
REST APIs with Spring
MongoDB World 2019: Becoming an Ops Manager Backup Superhero!
Introduction to memcached
Intro to Network Automation
Apache kafka
SOLID Principles and The Clean Architecture
Introduction to Redis
Clean architecture
Microservices Platform with Spring Boot, Spring Cloud Config, Spring Cloud Ne...
Simplify and Scale Data Engineering Pipelines with Delta Lake
[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버
Mastering DevOps With Oracle
Journey of saga pattern in microservice architecture
Developing Real-Time Data Pipelines with Apache Kafka
Akka.NET 으로 만드는 온라인 게임 서버 (NDC2016)
Ad

Similar to Database Change Management (20)

PDF
Delivering changes for applications and databases
PDF
Delivering Changes for Applications and Databases
PDF
Presentation application change management and data masking strategies for ...
PDF
Database Comparison & Synch | Change Manager Success Story
PDF
Ringing the Changes for Change Management
PPTX
Evolutionary database design
PDF
Change Manager Datasheet | Database Change Management
PPT
Evolutionary Database Design
PPT
Best Software Development practices by Hazem Torab
PDF
Database Change Management | Embarcadero Change Manager
PPTX
Why retail companies can't afford database downtime
PPTX
Evolutionary database design
PDF
javazone 2014
PPTX
manage databases like codebases
PPTX
Database Testing
PPTX
Delphix and DBmaestro
PPT
Planning for Synchronization with Browser-Local Databases
PDF
Database Change Management | Change Manager from Embarcadero Technologies
PDF
Road to database automation - Database source control
PDF
Road to database automation: database source control
Delivering changes for applications and databases
Delivering Changes for Applications and Databases
Presentation application change management and data masking strategies for ...
Database Comparison & Synch | Change Manager Success Story
Ringing the Changes for Change Management
Evolutionary database design
Change Manager Datasheet | Database Change Management
Evolutionary Database Design
Best Software Development practices by Hazem Torab
Database Change Management | Embarcadero Change Manager
Why retail companies can't afford database downtime
Evolutionary database design
javazone 2014
manage databases like codebases
Database Testing
Delphix and DBmaestro
Planning for Synchronization with Browser-Local Databases
Database Change Management | Change Manager from Embarcadero Technologies
Road to database automation - Database source control
Road to database automation: database source control
Ad

Recently uploaded (20)

PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Empathic Computing: Creating Shared Understanding
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
MYSQL Presentation for SQL database connectivity
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Big Data Technologies - Introduction.pptx
Machine learning based COVID-19 study performance prediction
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Empathic Computing: Creating Shared Understanding
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Approach and Philosophy of On baking technology
Review of recent advances in non-invasive hemoglobin estimation
sap open course for s4hana steps from ECC to s4
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Spectral efficient network and resource selection model in 5G networks
Per capita expenditure prediction using model stacking based on satellite ima...
20250228 LYD VKU AI Blended-Learning.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
MYSQL Presentation for SQL database connectivity

Database Change Management

  • 1. Database Change Management One solution to an often complex problem Kevin Hurwitz Headspring Systems [email_address]
  • 2. The Problem Most significant business applications rely on at least one relational database for persisting data As new features are developed, database schema changes are often necessary – i.e. new tables, columns, views, and stored procedures Database schema changes and corresponding code changes must always be deployed together While deploying software to a production environment, code files and libraries may usually be deleted or overwritten – Database files, however, must be intelligently manipulated so as not destroy vital business data
  • 3. Staging Database Environment To ensure an application remains stable throughout the development lifecycle, a data-driven application must be deployed to at least two environments: Production and Staging Database and corresponding code changes are applied and tested in the staging environment before being deployed to production Production Staging Production Users Developers Testers Salespeople Product Manager
  • 4. Many Database Environments While two database environments represent the bare minimum, teams become more productive when certain roles and individuals have their own copy of the database For example, a developer may make a change to the staging database which breaks the application and derails testers and salespeople Testers and salespeople may also want to work with their own set of data Production Demo Production Users Salespeople Developer #1 Developer #2 Tester #1 Tester #2
  • 5. Database Synchronization Many development shops shy away from creating numerous database copies due to the challenge of keeping them all “in synch” An automated process is needed to make the process of upgrading out-of-date databases simple Team members who maintain their own database will run the process on demand, while shared databases will be upgraded by an automated build Production Demo Production Users Salespeople Developer #1 Developer #2 Tester #1 Tester #2 Shared database upgraded by build/deployment process Individual database upgraded as needed
  • 6. Incremental Schema Changes All database schemas can be thought of as a compilation of incremental changes made over time to accommodate new functionality To automate the process developers will record all database changes as SQL scripts which they will commit to the source control repository A program can then be run to execute all of the change scripts against databases which have not yet received the necessary updates As updates are applied to a database, the changes will be recorded in a table similar to the following: 4-24-07 5_Add_transaction_status_column.sql 4-21-07 4_Add_transaction_table.sql 4-18-07 3_Add_fax_number_column.sql 4-17-07 2_Add_e-mail_address_column.sql 4-27-07 6_Add_customer-transaction_view.sql 4-15-07 1_Create_Customer_Table.sql Date Change
  • 7. Database Schema Change Lifecycle Time Developer creates an incremental SQL change script and tests the change locally Once the change is validated by unit tests, the script is checked into source control in a special location The automated build process kicks off, runs the upgrade process which executes the change script against the integration test database, and runs all unit tests to validate the change Once the build has succeeded, the tester can get the latest version of the software from source control and run the upgrade process via a GUI to upgrade her local database Once the build has been validated by QA, automated build processes can be run to deploy the software to staging and production
  • 8. Creating SQL Server Change Scripts Time Developer snapshots the current state of the database using Red Gate SQL Compare Developer makes all necessary changes to the database using SQL Server Management Studio Developers executes Red Gate SQL Compare to create a transactional change script for the change just made in SQL Server Management Studio The developer saves the Red Gate change script within the database script project under the “Update” folder The developer rebuilds the database from scratch, re-executes the database integration unit test, and commits the new script