NonStop Insider

job types


Site navigation


Recent articles


Editions


Subscribe


For monthly updates and news.
Subscribe here
NonStop Insider

Database Refactoring with Liquibase

Paul Denzinger, Distinguished Technologist in the NonStop Advanced Technology Center.

HPE

DanDan

hpe-logo

HPE ATC FEB 2021

In past years, prior to deploying an application, significant time and effort was expended in gathering requirements to produce a design. The design was completed up front, before any code was written or database schema created. Furthermore, the design was comprehensive and static – it was expected to be viable for years without requiring significant modifications. When changes eventually were needed, they became a major redesign effort that often impacted multiple facets of the application and database. None of this was completed quickly, or without risk.

Fast-forward to the present. Much has changed in the world of code development since that prior time. Now, it’s all about deployment speed and agility. Whoever gets there first, wins. That is the new mentality. So over the years, new practices and tools were developed to accelerate and simplify code development and deployment processes. Instead of developing comprehensive applications, the new methods emphasized developing what was most needed now, without too much concern for future requirements. Just-in-time development, in a sense.

So begins an examination of open source tools designed to better ensure the flexibilities and ease of integration that comes with Agile development and DevOps for those tasked with coding today’s applications. Most importantly, these tools are able to integrate application changes with database modifications, effectively migrating both entities as a coordinated unit. This is the subject of the latest article on the subject to appear in the January / February issue of The Connection and what follows here is with permission from the editor of The Connection.

While these modern approaches have been used very successfully to deploy new code capabilities, traditional database deployment practices have negated much of that benefit, because data and database structures, along with their embedded relationships – especially in large databases – are not easy to modify quickly. Database modifications became a bottleneck that constrained deployment productivity, and database refactoring emerged as a solution to this problem.

What types of modifications are included in database refactoring? Well, just about anything and everything. The point is to evolve a design as requirements dictate, and that includes all types of changes, starting with the initial creation of the database and all intermediate changes throughout its lifetime.

It’s important to understand that refactorings apply incremental changes to an object as opposed to replacing an object by simply recreating it. Incremental changes reduce risk and facilitate back-out contingencies, and support transitioning through application code versions more effectively. Multiple versions of the application can be supported by a properly refactored database until fully migrated.

As we look closer at database refactoring there are now important tools available to those tasked with development and deployment of databases featuring NonStop SQL/MX. One such tool that is proving popular is Liquibase (https://www.liquibase.org), one of the most common database refactoring tools. It is available as a free, open source Java jar file, which means it can be deployed on multiple open platforms. The open source version of Liquibase contains over 30 built-in database refactorings. A commercial version, Liquibase Enterprise, extends the core capabilities with additional features.

Most important of all? NonStop SQL/MX has been enhanced to support Liquibase commands via a Liquibase extension jar file which is included with the system software.

The concept of evolutionary database design introduces a new approach that incorporates the concepts of code refactoring into the process of database design maintenance. The popular open-source product, Liquibase, takes these concepts further by materializing them into an easy-to-use, effective productivity tool.

This article is based on the presentation from the author during TBC 2020 (Tandem Boot Camp) and is available for download/viewing. To read the full article as published in the latest issue of The Connection simply follow this link – https://connect2nonstop.com/database-refactoring-with-liquibase/