I am looking for a GUI program that can generate database table diagrams from a PostgreSQL database. I am aware of SchemaSpy, SchemaCrawler and PostgreSQL Autodoc but they are CLI. Any OS, price and license is fine.

A similar question was asked on SO but was closed: tools to generate database tables diagram with postgresql?

  • Here is the list of recommended GUI tools in the postgres wiki. GUI database design tools – Sudip Bhandari May 17 '17 at 11:17
  • 1
    @SudipBhandari: Among those what is the tool that you recommend to generate a tables diagram? Please post an answer for that particular tool and don't forget to include a screenshot of the generated diagram, thanks! – Nicolas Raoul May 18 '17 at 3:43

DBeaver free, multi-platform universal SQL client. Supports all popular databases: MySQL, PostgreSQL, MariaDB, SQLite, Oracle, DB2, SQL Server, Sybase, MS Access, Teradata, Firebird, Derby, etc.

You can do all crud operations as well as Advances operations from here. Supports N number of database types (Relational/NoSQL)

enter image description here

  • 1
    Gets the job done in the community edition. Used for Postgres. Recomended – amar Apr 30 at 6:26
  • <1 min to set up and connect to PostgreSQL database. Here's the documentation on bringing up the ER diagram as in @Akshay-Gupta's answer. github.com/dbeaver/dbeaver/wiki/ER-Diagrams – Jake Stevens-Haas May 24 at 23:19
  • Thanks, worked well with Postgres in mac. Had to download and attach dependencies though. – ArdentLearner Aug 30 at 9:28

You may use "Microolap Database Designer for PostgreSQL" aka PgMDD

It's a commercial software with 30-day trial though. Personal\Educational license will cost $124.95, however you may get a free license also (details on the order page).

Here is a quick tutorial on how to Reverse Engineer (Import) PostgreSQL database: https://www.youtube.com/watch?v=pj3-3VkW3qM

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

  2. 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. PgMDD Connection Manager

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

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

  5. Click OK to start the database reverse engineering process. reverse engineering process

  6. The reversed database objects will be placed in your diagram. Chinook database diagram


You can use SQL Power Architect:

  • Most features are free, including the ER schema generation
  • Microsoft Windows / Mac OS X / Linux
  • Supports most commonplace DBMS suggest MySQL and PostgreSQL

You just need to drag-and-drop to generate the visual schema:

enter image description here

enter image description here

  • Worked well for a quick and dirty reverse-engineered diagram. Threw a lot of exceptions in the process though. :) – Steve Czetty Mar 2 '17 at 17:06
  • You can also export it as a pdf or generate an HTML document with description of each of the table along with the hyperlink to the linked tables.. neat – Sudip Bhandari May 18 '17 at 9:00
  • SQL Power Architect needs Java to run (which I can't use) – Gawin Sep 21 '17 at 9:49

Try DbSchema, it's commercial software with free trial. It works with a couple of RDBMS and NoSQL databases. It generates interactive diagrams with clear layout and can export to SVG/png/jpg.

  • Please add a screenshot, thanks! The screenshot must show the step when you generate a diagram from an existing database. – Nicolas Raoul Feb 23 '17 at 9:41
  • DbSchema needs Java to run (which I can't use) – Gawin Sep 21 '17 at 9:48

Here is the best way that I found:

1- Export your database schema as SQL. Most databases have a tool for that. 2- Go to Draw.io and open an empty file. 3- click the plus on the top ( Help: https://about.draw.io/entity-relationship-diagrams-with-draw-io/ ) 4- Select from SQL and paste your sql script. 5- Rearrange your tables.

This is easiest way to do it without installing any software.


You may use PgModeler. It is open source software and works fine on Linux. http://www.pgmodeler.com.br/

  1. run pgmodeler, click on import, select connection and database then click on import. (don't forget to edit connections to set your db-user and password)

run pgmodeler, click on import, select connection and database then click on import.

  1. Once done you may work on your model.

Once done you may work on your Model.

after working on your model you can export it to an .sql file or export the changes to your connected database

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.