DZone
DevOps Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > DevOps Zone > Database Continuous Delivery in a Git World

Database Continuous Delivery in a Git World

Life is too short to have to worry about multiple systems of record. Until you can avoid reviewing database schema changes at every point, you aren't moving at Git speed.

Robert Reeves user avatar by
Robert Reeves
·
Jan. 19, 17 · DevOps Zone · Opinion
Like (2)
Save
Tweet
5.19K Views

Join the DZone community and get the full member experience.

Join For Free

Git has radically changed our perspective on branching and merging, distributed development, and the value of treating everything as code. Git users are able to rapidly branch and merge code to support non-linear development. With local repositories, Git supports widely distributed development teams that are no longer dependent on network resources. Our environments are now being described in code stored in Git repositories.

All of these benefits can be shared with our database developers and database administrators with just a few shifts in focus.

The first shift is that we must store all our environment changes (code, database schema changes, and environment config) in Git. We can no longer have multiple systems of record. Prior to Git, we were slowed by the network requirements of other version control systems. We didn’t want to store large amounts of information in the repository because pulling it down took too long. Now, with local repository access with Git, we see several orders of magnitude in performance improvement.

To that end, by storing our code and database changes in one location, we can benefit from the atomicity of the change. No longer are we concerned with which version of the code changes goes with which version of the database changes. Life is too short to have to worry about multiple systems of record.

Secondly, manual review of database changes at every stage needs to stop. Nowhere in our software development lifecycle do we review code changes after a build and release to test. Sure, we have code reviews in development — and thanks to Git’s rapid branch and merge capabilities, we can easily do that. However, we are not performing the same code reviews with our database changes.

Consider this: what impact would a system administrator reviewing code changes prior to deployment have on our deployment times? Of course, deployment times would expand. However, I’m sure you are most concerned with why a system administrator is reviewing code changes. Commonly, we have our Database Administrators perform this same review.

Forcing a review of database schema changes at every point proves that your current process and tooling is unable to guarantee quality and safety of the change. Until you can avoid this, you are not moving at Git speed.

Finally, relying on SQL scripts alone is foolish. The problems inherent to deploying SQL scripts are twofold. The first issue that you are faced with an incomplete execution of a series of scripts. You have no guarantee that your SQL scripts will execute properly in a target environment (which probably explains why you are manually reviewing today.) Secondly, if there is a failure that requires some rollback, you are left with manually exiting the deployment. Of course, you can mitigate that by requiring rollback scripts, but enforcing that is another headache and burden for an already overworked database team.

Database Git CI/CD Delivery (commerce)

Published at DZone with permission of Robert Reeves. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Version Number Anti-Patterns
  • 5 Steps to Create a Successful Agile Release Plan
  • API Security Weekly: Issue 165
  • Introduction to Word Vectors

Comments

DevOps Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo