Database Continuous Integration


Continuous integration is a development process requiring developers to integrate code into a shared repository or environment multiple times each day. Regular, frequent integration allows for rapid error detection and easy error location detecting to streamline the development process for safer, more rapid deployment of changes.

In the continuous integration process, code is verified using automated build functionality on each check-in. Frequent integration combined with ongoing verification and rapid error detection means less back-tracking to figure out where things went wrong, shortening the time between integrations and offering substantial cost-savings in development.

Continuous integration best practices include:

  • Maintaining a single source repository (a single source of truth)
  • Build automation
  • Rapid, self-testing builds
  • Deployment automation
  • Visibility into the development cycle for all team members
  • Testing in a clone of the production environment

With DBmaestro’s DevOps Platform, database continuous integration is also within reach. Bring the database (SQL Server, Oracle, etc.) up to native/application code (C#, C++, Java, etc.) integration par.

Native Code is Easy to Integrate, But What About the Database?

Existing SCM solutions make the integration of changes to native code (C#, C++, Java, etc.) much easier and more manageable. One can review each team’s changes and decide how to merge them, or determine whether there is a conflict and decide whether a change should be implemented, postponed, or discarded. But database code is an integral component of any application, and changes to database objects are also part of these version changes. However, the task of code merging is not as easy when dealing with database code as it is when dealing with native code.

When it comes to database code, simply copying and pasting code changes to database objects is not feasible. Databases have a special syntax for modifying objects, adding and deleting columns, changing a column’s data type, altering a package, etc. Therefore, during the integration cycle, most of the time and effort is spent preparing the database migration script.

This manual process is time-consuming and leaves room for human error; a critical hitch in the pursuit of database continuous integration. Rapid and agile development demands a more automated solution that reduces both the need for manual interventions and lessens the risk of introducing human error into the integration process.

For Database Continuous Integration Compare-and-Sync Tools Only Go So Far

Until recently, the best solutions available for streamlining database continuous integration were standard compare-and-sync tools. These tools compare two database schemas and show the differences between them, but relying on compare-and-sync tools to automate a deployment process is a big risk. Why? While it’s easy to identify differences between two different environments, it’s impossible to determine the origin of each change by relying only on compare-and-sync tools.

Was the change made in a team’s development environment or in the integration environment after another team had already integrated their changes? This question is difficult to answer without comparing the database schemas to a baseline and without having an accurate audit trail of the changes in each environment (which is an important aspect of version control).

Overriding good code in an integration environment with an out-of-date revision from a development branch is painfully easy, and doomed to fail sooner or later.


Using Baseline-Aware Analysis to Overcome Compare-and-Sync Shortcomings

DBmaestro DevOps Platform is much more than just another compare-and-sync solution. DevOps Platform’s unique impact analysis solution utilizes Baseline-Aware Analysis, a three-way comparison process that compares each integrated database schema to both the baseline and the target environment. The baseline can be a saved version of a team’s development environment, a saved version of the integration environment, or any other relevant reference (e.g., a production database).

Only this three-way analysis makes continuous database integration possible, by pinpointing the origin of changes, generating a safe deployment script, and identifying conflicts between development environments. Baseline-Aware Analysis allows DBmaestro DevOps Platform to automatically determine which code can be safely merged, when the target should be protected, and when to raise flags that halt the automated process when manual intervention is required to determine how. This keeps the focus on impact analysis, rather than damage control – making the automation process trust worthy.

How can we help you? What can we​ do for you today?​ Tell us a bit about yourself

Featured Posts

Database Design Best Practices: 7 Mistakes to Avoid

Yaniv Yehuda | May 02, 2018
While the main focus of DevOps efforts has been placed on application-side development, the database plays an important role in ensuring smooth sailing. 
Read More