Version Control Meets Data Control
Webinar: DB Maestro and Delphix
Three part post
- part 1 Version Control Meets Data Control (this post)
- part 2 Databases for every developer like source code?
- part 3 Merging and Branching a Database
Imagine being tasked with writing a twenty-page paper. In pen. How would you ensure a complete paper without any mistakes? Sure, you can rewrite a page if something goes wrong, but that’s a lot of extra work that could potentially set you back hours. In fact, even though each completed page is a saved document and therefore safe, if you are ever asked to rewrite even a single word you will have to rewrite an entire page.
So what could you do to minimize the risk and ensure you don’t waste much time? One option is to make a copy of each page after every sentence. In the event of an issue on any sentence, you can revert to a copy and begin from there and save yourself at least some work. When a page is confirmed as being good you can commit it, and when all the pages are confirmed you can merge them into a final document.
Obviously there are better solutions than this (like not using pen in the first place). But in application code, we face similar issues. Thousands of lines of code that have to be written, checked, crosschecked, put through QA cycles, subjected to UAT, and finally merged together into a cohesive package for production that may or may not be what the customer is looking for. And in that world we have a similar solution called source control.
Sadly, in the database world we have no widespread source control. Some organizations do track changes in development, QA, and production databases as they are made. But a complete solution incorporating data versioning, change repositories, development merging, and rollback capabilities is out of reach for most organizations. Surprisingly this is even true for code such as PL/SQL, T-SQL, etc. in many cases.
Databases Pose Unique Source Control Problems
Database development poses unique problems for source control compared to traditional code development. This is because the database is not a flat code object; instead, it is constructed from various parts:
- Schema Structure
- Database Code (PL/SQL, T-SQL, etc.)
The simple truth is that databases can’t be given to every developer like source code.
More to come tomorrow and join us for a webinar with DB Maestro Thu, Oct 24, 2013 12:00 PM – 1:00 PM EDT.
above photo by Charles Kenny