GuttenBase database migration framework 2.0.0 released

We’re glad to announce the new release of the GuttenBase database migration framework. The main but not only goal of this framework is to support database migrations between different (heterogenous) RDBMS, such as DB2, MySQL or Oracle. During the copying process you may apply various transformations such as data mapping, columns alteration, renaming tables, …

The 2.0 release features among various API enhancements and speed improvements: Java 8 support, a new tool to copy schemas between different databases, more supported database types, mapping of proprietary database column types, new documentation, …

While there are some existing tools that allow you to copy databases, such as the MySQL database migration wizard, those are mostly limited to a special purpose. GuttenBase focuses on the migration process which can be influenced programmatically via so called hints. Hints may influence the SQL syntax, provide data mapping algorithms, set batch sizes, etc..

Given valid source and target schema information, copying all data from one database to another can be done as simple as:

_repository.addConnectionInfo("source", new DB2ConnectionInfo());
_repository.addConnectionInfo("target", new MySqlConnectionInfo());
...
new DefaultTableCopyTool(_repository).copyTables("source", "target");

The connector repository is the entry point to all information about the migration. It contains database connection informations  (URL, user name, …), migration hints, database meta data, and configuration settings.
You may add hints to the connector repository in order to influence the copying process. The following example limits the range of data being copied for a given table, e.g.:

_repository.addConnectorHint("target", new SelectWhereClauseHint() {
  public SelectWhereClause getValue() {
    return tableMetaData -> {
      if (tableMetaData.getTableName().equalsIgnoreCase("article"))
        return "WHERE ID >= 50 AND ID <= 250";
      else
        return "";
    };  } });

The framework also contains many other tools and features like schema copying (DDL), (empirically) checking copied data for equality, dumping database contents to a ZIP file or checking given schemas for compatibility:

final SchemaCompatibilityIssues issues = 
   new SchemaComparatorTool(_repository).check("source", "target");

if (issues.isSevere()) {
  throw new SQLException(issues.toString());
}

GuttenBase is hosted at GitHub. For more information please visit the GuttenBase web site.

Posted in All

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s