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 here the latest version. Next, 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 appropriate jdbc database driver is in the classpath (or in the folder where the application has been unzipped). Below are some direct links to download the drivers for some databases (maven):

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 tested with Java 1.8 on Windows and linux

As it uses standard jdbc methods to discover the database schema, it will work with virtually any database vendor, provided that you have the appropriate jdbc driver.