XDBSchema - Generation of a Database Schema in XML

XDBSchema is a standalone application that generates an XML representation of a database using a jdbc connection to the database. This format is required by some tools like SQLMutation and SQLFpc.

Download

Download here the latest version. After, unpack the ZIP file. The following filles will be present in your directory:
After running it for the first time, the following files are generated:

First at all, you must be sure that you have your database running and the adequate jdbc database driver is in your default directory. Here you can find the drivers for some databases:

Quick Start

Launch the main class of xdbschema.jar using the following java command (where drivername.jar is the name of the vendor's database driver file. Note that you don't need specify a driver name if your are going to use the jdbc-odbc bridge driver):

java -classpath drivername.jar;xdbschema.jar in2test.application.xdbschema.XDBSchema

Alternatively, you may edit the xdbschema.bat script file specifying this command and then run the script.

The following window will be displayed:

XDBSchema main window

The first step consists on filling the information that is needed to connect the database using jdbc (Database connection info at the left of the window). See Specifying connection info for more information.

Next, you can use the following options:

Specifying connection info

The information required to access the database is explained below:

XML database schema syntax

The XML representation of the database schema consists on a root tag <schema> which contains a series of <table> tags. Each of them contains a <column> tag for each of the columns in this table. Attributes of the tags contain the information related to name, data type, etc.

The <schema> tag may include three attributes, namely:

Both catalog and schema attributes are optional. However, they are relevent in order to determine what tables are to be found. Recall that according to the SQL Standard, a table specification may be qualified in the form [[catalog.]schema.]name. If a table name is not qualified (using catalog and/or schema), a default catalog and/or schema is assumed. In that case the deafaults are the indicated by dbcatalog and/or dbschema:

Supported database vendors and drivers

Latest builds of these applications has been developed and tested in Eclipse 4.3.2 using Java JDK 1.8 and JavaCC 4.2 under Windows 10, but may run on lower JRE versions.

As it uses standard jdbc methods to discover the database schema, it will work with virtually any database vendor, provided that you have a jdbc driver. As of Java JDK 1.8 the jdbc-odbc bridge is not supported, you should run a lower version of the JRE in order to use it.

This is the list of configurations that have been used for testing latest builds:

Database Product NameVersionDatabase Driver NameVersion
Oracle 11g Enterprise 11.2.0.1.0 Oracle JDBC Driver 11.2.0.1.0
Microsoft SQL Server 2008 10.00.5500 Microsoft SQL Server 2005 JDBC Driver 1.2.2828.100
MS Access 2003 11.8166.8202 HXTT Access JDBC Driver 3.0