Reverse Engineering

Reverse Engineering helps you to import your current schema from your database server into SchemaBank. 

First, you would export the database schema from your database server using the corresponding dump utilities, Then, you can import the schema dump into SchemaBank.

Export MySQL Database Schema

Use mysqldump to export your MySQL database schema into a file:

mysqldump --no-data [other_options] db_name > output.sql

Remember to use the --no-data option to skip dumping of the data stored inside the tables. We need the schema only.

 
Export PostgreSQL Database Schema

Use pg_dump to export your PostgreSQL database schema into a file:

pg_dump --format=p --schema-only --no-owner --disable-dollar-quoting [other_options] db_name > output.sql

Remember to use the --schema-only option to skip dumping of the data stored inside the tables.

If you are using PG Admin to create your backup dump, using the options below should give the best result in reverse engineering.

Import Database Schema

Select File > Reverse-Engineer from the menu bar. You will be prompted to select the sql dump file and the imported schema will be committed as a version. You can retrieve it into your working copy from Version Manager tab.

Note that the default schema specified under the Option tab will be used during import. You have to make sure it matches your schema dump.