Chapter 86. Control the Data, Not Just the Code

Chad LaVigne is a solutions architect and technical hired gun for Baltimore-based TEKSystems, Inc. He works primarily in the Minneapolis area designing and implementing solutions utilizing Enterprise Java technologies.

Chad LaVigne
image with no caption

SOURCE CODE CONTROL AND CONTINUOUS INTEGRATION are excellent tools for managing the application build and deployment process. Along with source code, schema and data changes are often a significant part of this process and thus warrant similar controls. If your build and deployment process includes a list of elaborate steps required for data updates, beware. These are the lists that always have you crossing your fingers. They look something like this:

  1. Create a list of scripts that need to be run, in order.

  2. E-mail scripts to special database person.

  3. Database person copies the scripts to a location where they're executed by a cron job.

  4. Check script execution log and pray that all scripts ran successfully since you're not exactly sure what will happen if you rerun them.

  5. Run validation scripts and spot-check the data.

  6. Regression test the application and see what blows up.

  7. Write scripts to insert missing data and fix blow-ups.

  8. Repeat.

OK, so that might be a slight exaggeration but it's not that far off. Many a project requires this type of acrobatic workflow for successful database migration. For some reason the data portion ...

Get 97 Things Every Software Architect Should Know now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.