SchemaSpy is a simple reverse engineering tool that takes a SQL database and generate diagrams of the database schema. This is a java program; it runs on all platforms.
SchemaSpy reads a relational database and
- generates a XML file corresponding to the database schema
- detects a few kind of defaults in the database design
- generates a html site a la javadoc with clickable entity-relationship diagrams.
SchemaSpy is particularly interesting because the reverse engineering process generates a rather simple XML file so that other tools can be build by consuming this file.
To install SchemaSpy:
You can check if the installation (in a new shell) by trying the
This command should display a rather long list of supported database types, with the option to use to connect to the database in each case.
You need an access to a SQL database if you want to execute SchemaSpy. The command line options are described in the documentation.
SchemaSpy and SQLite¶
The SQLite driver delivered with SchemaSpy is not working. If you want to use SQLite, a driver and a property file must be installed:
- make sure that the driver have been installed (see the
Installation section of SQLite).
This results in the driver
- Copy the file
sqlite.propertiesinto the directory
- Adjust the location of the driver in the
To use a SQLite database file you will have to specify the path to
the property files with the
-t option: For instance the following command
line generate the documentation of the database
schemaspy -t %SCRIBESTOOLS%/SchemaSpy/sqlite.properties -db db.sqlite3 -sso -o docs\SchemaSpy
schemaspy -t orathin -host im2ag-oracle.e.ujf-grenoble.fr -port 1521 -db ufrima -s MYLOGIN -u mylogin -p * -o out