30

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?

2
  • Here is the list of recommended GUI tools in the postgres wiki. GUI database design tools 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
22

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

4
  • 2
    Gets the job done in the community edition. Used for Postgres. Recomended
    – amar
    Apr 30 '19 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 May 24 '19 at 23:19
  • Thanks, worked well with Postgres in mac. Had to download and attach dependencies though. Aug 30 '19 at 9:28
  • amazing works great!
    – pyramation
    Apr 25 at 22:38
6

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

5

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

3
  • Worked well for a quick and dirty reverse-engineered diagram. Threw a lot of exceptions in the process though. :) 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 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
2

Datagrip by Jetbrains. Apart from PostgreSQL it works with various RDBMS (MYSQL, SQL Server, MongoDB,...).

They have a 30 day trial and there are various pricing options.

Here's how to do it: https://www.jetbrains.com/help/datagrip/creating-diagrams.html

enter image description here

1
1

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.

2
  • 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
0

I am currently using Valentina Studio

Here is a diagram I created. I noticed if the foreign keys had the same name (in different tables) it would only show one of the links. When I named the foreign key constraints with different names it fixed the diagram.

jpg of Valintina diagram

0

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 )
  4. Select from SQL and paste your sql script.
  5. Rearrange your tables.

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

1
  • This sounds good. Can you post a screenshot?
    – pir
    Jul 9 '20 at 0:42
-1

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

2

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.