Reverse Engineering PostgreSQL Database

Top Previous Next

You can reverse engineer an existing PostgreSQL database. This means that you can extract the database tables, attributes, relationships, indexes and other objects from the database to your diagram.

To reverse engineer PostgreSQL database:

1. Select File | Reverse Engineer | PostgreSQL database or press Ctrl-R.

2. If the currently opened diagram already contains some objects, a warning dialog box will appear:


It requests you to create a new diagram to place the reversed objects into or use the currently opened diagram.

Click Yes to create a new diagram or No to use the currently opened diagram. Click Cancel to cancel reverse engineering.

Select Do not show this dialog again to disable future notifications.

3. If connection for the current diagram has not been established, Database Connection Manager will be shown. Select a profile from the list of the available ones or create a new profile to connect to the database you want to revere engineer.

4. The PostgreSQL Database Reverse Engineering tool will be shown. You can set the reverse engineering options in the Options tab.


Reverse Engineer references

This option enables extracting foreign keys from the database and creating appropriate references in your diagram.

Auto layout objects after reverse engineering

Select this option if you want to Designer perform auto layout of reversed objects

Color reversed objects

This option allows you to set fill colors for newly reversed objects. It may be useful if you're performing Reverse Engineering into non empty diagram, thus you may distinguish old objects from reversed ones.

5. In the Selection tab of the PostgreSQL Database Reverse Engineering tool you can choose the objects you want to reverse engineer.

There are several subtabs: Tables, Views, Stores Procedures and Types & Domains. Each of them allows you to select appropriate database objects. Click on the checkbox near the object to enable its reverse engineering. Pay attention to the Select All and Deselect All buttons on the tab, they allow you to select/deselect all objects in the list.

6. Click OK to start the database reverse engineering process. The Output -> Reverse docking window will display the state of the process.

7. The reversed database objects will be placed in your diagram.

See also:
Reverse Engineering and Import: Reverse Engineering and Import Overview | Import from Access Database | Universal Reverse Engineering | SQL Reverse Engineering