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.
How to make an ER diagram on a Mac
- Connect to your database in SQLPro Studio.
- 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.
- 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.
- 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.
- 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
| Task | How |
|---|---|
| Add tables | Add > 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 need | Select them (Command-click for several), then Remove > Remove from Diagram. Your database is not changed. |
| Tidy the layout | Auto Layout, or drag tables; relationship lines follow |
| Change the detail | Columns (every column), Keys (primary and foreign key columns only) or Names (table names only) |
| Follow relationships | Select a table to highlight its foreign key lines |
| Find a table | Type in Find Table; zoom in, out or to fit |
| Work with a table | Right-click it for Browse Data, Open Table Designer, Copy CREATE Statement and Copy Table Name |
| Change the database | Add > New Table in Database…, or Remove > Drop Table from Database…, which shows the DROP statement before anything runs |
| Share it | Export as PNG or PDF, Copy as Image, or Print |
On iPhone, iPad and Android
The same ER diagram is in SQLPro Studio and the single-database SQLPro apps on iPhone, iPad and Android:
- Open a connection, go to the Tables section, and under Actions tap ER diagram for the whole database, or open a table's actions and tap Show in ER diagram.
- Pinch to zoom, drag with one finger to move around, and drag a table to move it. Double-tap to zoom in on a spot.
- Switch between columns, keys and names, add related tables, and remove tables from the diagram from the table's menu.
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
- MySQL and MariaDB: including Amazon RDS, Aurora, Azure Database for MySQL and Google Cloud SQL.
- PostgreSQL: a diagram per schema (Show Schema Diagram), or from any table.
- Microsoft SQL Server and Azure SQL.
- SQLite: also in SQLPro for SQLite on the Mac, which has a Diagram tab.
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