DataStar¶
DataStar is a development tool designed to bring change management disciplines to managing database components. The definition of database components for this purpose includes tables, views, triggers, functions, stored procedures, and data components. A data component captures the data or subsets of data across one or more tables in re-runnable SQL scripts in an environment-agnostic way. This allows the data to be encapsulated into scripts which can be version-controlled and managed much like code, using a version control system such as GIT or TFS. DataStar is a desktop application that enables users to generate the scripts, manage them under version control, and deploy them to the target environment, offering additional features to facilitate comparison with different versions and control database updates in a standardized manner.
Code Generation¶
In many systems, code is stored in configuration and reference data tables, historically posing challenges in management and migration throughout the software development lifecycle. DATASTAR stands out as it not only versions objects such as functions, procedures, and triggers, but its key feature lies in its ability to version data by generating scripts that encapsulate the data and their relationships with other tables.
Internal identifiers and foreign key identifiers typically differ between environments; the automatically generated scripts manage these identifiers using alternative or surrogate keys. These scripts do not contain transient values, making it easy to compare different environments using standard text-based comparison tools. They are self-contained and comprehensible to anyone familiar with SQL.
The level of granularity is configurable for each component, allowing you to decide whether to break data down into subsets or group it into larger datasets. Generally, finer granularity is preferred as it avoids conflicts on components when multiple changes impacting the same set of tables are in progress.
Deployment¶
Using a Source Control Management (SCM) System such as GIT or TFS, the generated components can be placed under source control, building up a history of changes over time.
DataStar integrates with your SCM System, enabling you to identify changes and package a deployment accordingly. This involves generating a deployment file using the change history in your SCM System; where necessary, additional scripts can be triggered, and other custom scripts included. The deployment file contains all the information about your release, including the version number, scripts, and the order in which the deployment will be executed.
With the deployment file, you can deploy the changes to any environment. Additional features include generating a back-out deployment file and generating a SQL Script that encapsulates the deployment in a single file. The deployment process captures all the changes made and creates a log file, which can be saved as part of the audit information for a deployment.
All the scripts are re-runnable and can be safely reapplied to an environment. They are designed to check whether changes are required, avoiding unnecessary updates and providing more accurate audit information.