XDBSchema - Generation of a Database Schema in JSON and XML

XDBSchema is a standalone application that generates a JSON or XML representation of a database using a jdbc connection to the database. This format is required by some tools like SQLRules.

Download

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:

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

Alternatively, you may edit the xdbschema.bat or xdbschema.shscript 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:

Database schema content

The schema content is definde as indicated in the OpenApi specification (see DbSchema, DbTable and DbColumn in the Schemas section):

The schema 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.