Database Continuous Integration - Chapter 5 - Artifacts and Installation Packages

By: Alex â€‹Podlesny

In this chapter: database artifacts. 

If you landed on this page from search engine, we would recommend starting with the first chapter

Almost at every step of a CI process there would be some sort of a Database Artifacts generated; they can be different and similar, and all fulfill their individual purpose. Here a few core samples:  

SQL Scripts - a group of database SQL scripts. Can be separated in following categories: 

Artifact1. The complete list of scripted-out database objects and metadata. If run in an empty database server, it creates brand new database will all of its objects and initial set of data;
2. A package that add new functionality or changes existing functionality to an existing database;
3. A package that inserts new or manipulate existing data within existing database. 

An installation, in this case, can be a simple execution of the scripts on target database server. While script execution might not be a viable approach for databases with many objects and metadata, it can be quite efficient to deliver hotfixes and incremental updates, especially to production environments. 

Back Ups Or DB Files - different flavors of backup processes available for various database engines. Some of them work for a particular use case better than other. They usually divide into following categories: 

  • Cold backup - is done when database server is down, and actual database files can be copied to another location (preferred approach). In Oracle, it might require server shutdown while in the SQL Server it can be achieved by detaching the database in order to gain access to actual database files;  
  • Hot backup - performed while database is in use.

An installation, in case of backups, can be completed by the set of scripts that perform automated restore on a target database server. While installation would be an excellent solution for application development and automation of unit tests, it has limited use for deploying changes to running production and running test environments. 

Virtual Servers - a set of fresh virtual clones can be used as a starting point for a CI process to install fresh and clean databases.  

An installation, in this case, consist of an on-demand virtual machine provisioning by a consuming system. 

Solution and a type of artifact do not need to be rigid, a mix of the strategies can be chosen to satisfy development and integration tasks that appear at a time.

 

Sunday, January 4, 2015 4:27:00 PM
Comments are closed on this post.
  • RSS
  • Add To My MSN
  • Add To Windows Live
  • Add To My Yahoo
  • Add To Google

Statistics

  • Entries (13)
  • Comments (0)