Generate an ER diagram from your database

Last updated: November 24, 2026

SQLPro Studio draws an entity relationship (ER) diagram straight from an existing MySQL, MariaDB, PostgreSQL, SQL Server or SQLite database. On a Mac, right-click a schema and choose Show Schema Diagram, or right-click a table and choose Show ER Diagram. On iPhone, iPad and Android, tap ER diagram under Actions in the Tables section. You see every table with its columns, primary keys and foreign key relationships, and you can tidy the layout and export it as a PNG or PDF.

An ER diagram of a PostgreSQL schema in SQLPro Studio on a Mac: tables, columns, primary keys and foreign key lines
An ER diagram of a PostgreSQL schema in SQLPro Studio on a Mac: tables, columns, primary keys and foreign key lines

How to make an ER diagram on a Mac

  1. Connect to your database in SQLPro Studio.
  2. In the sidebar, right-click a schema (PostgreSQL) and choose Show Schema Diagram to see every table in it, or right-click any table and choose Show ER Diagram to start from that table.
  3. The diagram opens in a new tab. Each table lists its columns and types; the key icon marks the primary key, and each line is a foreign key, with the forked end on the table that holds many rows.
  4. Click Auto Layout to arrange it, or drag tables where you want them. The layout is saved, so the diagram looks the same the next time you open it.
  5. Use the share button to export it as a PNG or PDF, copy it as an image, or print it.

What you can do in the diagram

TaskHow
Add tablesAdd > All Tables or Existing Tables…, or select a table and click Related to bring in the tables it connects to
Hide tables you don't needSelect them (Command-click for several), then Remove > Remove from Diagram. Your database is not changed.
Tidy the layoutAuto Layout, or drag tables; relationship lines follow
Change the detailColumns (every column), Keys (primary and foreign key columns only) or Names (table names only)
Follow relationshipsSelect a table to highlight its foreign key lines
Find a tableType in Find Table; zoom in, out or to fit
Work with a tableRight-click it for Browse Data, Open Table Designer, Copy CREATE Statement and Copy Table Name
Change the databaseAdd > New Table in Database…, or Remove > Drop Table from Database…, which shows the DROP statement before anything runs
Share itExport as PNG or PDF, Copy as Image, or Print
Selecting a table highlights its foreign key relationships; tables can be dragged anywhere and the layout is saved
Selecting a table highlights its foreign key relationships; tables can be dragged anywhere and the layout is saved
Keys view: each table shows only its primary and foreign key columns
Keys view: each table shows only its primary and foreign key columns

On iPhone, iPad and Android

The same ER diagram is in SQLPro Studio and the single-database SQLPro apps on iPhone, iPad and Android:

Monthly and yearly plans bought on sqlprostudio.com include the Mac, iPhone, iPad, Android and Windows apps.

Watch it

Short video tutorials, recorded in SQLPro Studio with a sample database:

More tutorials: youtube.com/@hankinsoftdev

Supported databases

Diagrams of existing databases, not model-first design

SQLPro's ER diagram reads the tables and foreign keys that already exist in your database, and the diagram itself is stored on your device, never in the database. If you want to design a schema as a model first and generate or synchronize the database from it, tools such as MySQL Workbench (EER modeling) or Navicat's data modeler are built for that. SQLPro is for seeing, documenting and working with the database you already have.

Questions people ask

How do I generate an ER diagram from an existing database?

Connect to the database in SQLPro Studio. On a Mac, right-click a schema and choose Show Schema Diagram, or right-click a table and choose Show ER Diagram. On iPhone, iPad and Android, tap ER diagram under Actions in the Tables section. SQLPro reads the tables, keys and foreign keys and draws the diagram for you.

Does making an ER diagram change my database?

No. The diagram and its layout are stored on your device, and removing a table from the diagram only hides it there. Only New Table in Database and Drop Table from Database change the database, and Drop shows the DROP statement before it runs.

Which databases can SQLPro draw ER diagrams for?

MySQL and MariaDB, PostgreSQL, Microsoft SQL Server and Azure SQL, and SQLite.

Can I export the ER diagram as an image or PDF?

Yes. On the Mac, the share button exports the diagram as a PNG or PDF, copies it as an image, or prints it.

Is there an ER diagram tool for Mac that is not Java?

Yes. SQLPro Studio is a native Mac app built with Swift and Objective-C. It draws ER diagrams of MySQL, PostgreSQL, SQL Server and SQLite databases without Java or Electron.

Can I see an ER diagram on my phone?

Yes. SQLPro Studio on iPhone, iPad and Android draws the same ER diagram, with pinch to zoom and tables you can drag.

See also: the best database software for Mac · free SQL clients for Mac