What is Database Continuous Integration?Published 12 April 2012 2:04 pm
Although not everyone is practicing continuous integration, many have at least heard of the concept. A recent poll on www.simple-talk.com indicates that 40% of respondents are employing the technique.
It is widely accepted that the earlier issues are identified in the development process, the lower the cost to the development process. The worst case scenario, of course, is for the bug to be found by the customer following the product release. A number of Agile development best practices have evolved to combat this problem early in the development process, including pair programming, code inspections and unit testing.
Continuous integration is one such Agile concept that tackles the problem at the point of committing a change to source control. This can alternatively be run on a regular schedule. This triggers a sequence of events that compiles the code and performs a variety of tests. Often the continuous integration process is regarded as a build validation test, and if issues were to be identified at this stage, the testers would simply not ’waste their time ‘ and touch the build at all. Such a ‘broken build’ will trigger an alert and the development team’s number one priority should be to resolve the issue.
How application code is compiled and tested as part of continuous integration is well understood. However, this isn’t so clear for databases. Indeed, before I cover the mechanics of implementation, we need to decide what we mean by database continuous integration.
For me, database continuous integration can be implemented as one or more of the following:
1) Your application code is being compiled and tested. You therefore need a database to be maintained at the corresponding version.
2) Just as a valid application should compile, so should the database. It should therefore be possible to build a new database from scratch.
3) Likewise, it should be possible to generate an upgrade script to take your already deployed databases to the latest version.
In future blogs posts (I will link the relevant ones off this blog) I will be covering how Red Gate tools can help you get up and running with SQL Server continuous integration. In the meantime, more information can be found in the whitepaper linked off www.red-gate.com/ci
If you have any questions, feel free to contact me directly or post a comment to this blog post.