Database reverse engineering

 

The integrated Entity Relationship Modeller helps you to design complex database layouts and get an easy overview over existing database projects. It let's you either design a model from scratch or easily import (reverse engineer) an existing database.

Reverse engineer a database

 

Entity Relationship Modeller

Select E/R Modeller from the Tools menu to open the Entity Relationship Modeller. After launching the ER Modeller you will see a white page to design your model.

     
 

To reverse engineer an existing database click the "Import ER Model" icon in the toolbar.

You can now select any existing database connection. The ER Modeller contacts your database and checks whether it supports Catalogs and/or Schemas and presents the available Catalogs and/or Schemas for selection. Now select the Catalog and/or Schema you want to reverse engineer and click select to start the import.

Reverse engineering supports all database types supported by SQL4X Manager J. However some database types (like MySQL without InnoDB tables) do not support or ignore foreign keys (referential integrity). In case your database server supports foreign keys they are loaded with each table (entity) and displayed as relation (each foreign key will be displayed as a line connecting to the destination table for the referential integrity constraint).

If your database server does not support foreign keys, they simply will no be shown. If you want the relations between your table to show up as lines connecting the entities on screen and your database server does not provide the necessary foreign key information, you have to add the foreign key constraints with the Inspector to each table manually.

 

Create SQL from an Entity Relationship Model

Click "Generate SQL" in the toolbar to save a SQL script that will create the ER Model. The generated SQL script is ANSI SQL92 compliant.

 

Save an Entity Relationship Model as Image

Click "Export as Image " in the toolbar to save the displayed ER Model as TIFF image.

 

Print an Entity Relationship Model

Printing an ER Model is not yet supported. You have to save the ER Model as TIFF image as use Mac OS X's Preview (or any other application) to print the ER Model.