Skip to content

ERDs

Draw an entity-relationship diagram of a database, arrange and save it, and export it as an image, text or a Lucidchart document.

An ERD (entity-relationship diagram) shows a database’s tables, their columns, and the foreign keys between them.

Draw a diagram

  1. Open ERDs and choose New ERD. You can also choose ERD on a connection’s card.
  2. Choose what to draw from:
    • Connection: choose a Connection and a Database.
    • Project side: one side of a project. Shown when you have projects.
  3. Tick the schemas to draw. By default, every schema with objects is ticked. MySQL draws the whole database, so there are no schemas to choose.
  4. Optionally, set:
    • Tables (optional): a comma-separated filter, such as order*, customer, *_log. * is a wildcard; other text matches any table name that contains it.
    • Views and Materialized views: draw them too.
    • Referenced tables from other schemas: on by default. Tables in other schemas that the drawn tables refer to show faded.
  5. Choose Draw diagram.

Find your way around

  • Scroll to zoom, and drag the canvas to pan. The minimap pans and zooms too.
  • Zoom in, Zoom out and Fit (fit to screen) are in the toolbar.
  • Tidy arranges every table again.
  • Find a table or column highlights matches. Press Enter for the next match and Shift+Enter for the previous one. Escape clears the search.
  • The Legend explains the symbols: primary key, foreign key, not null, and how many rows each side of a link can have.

Tables and relationships

Choose a table to highlight its related tables and links, and open its details: its kind, comment, and columns with their keys, types, defaults and comments. Its References, Referenced by and Views entries jump to each relationship.

Choose a line to select that relationship. Its panel shows the two tables and columns, whether it is one to many or one to one, required or optional, what it means in words, and its on delete and on update rules. Dashed lines are views reading a table.

Hover over a line, table or column for more detail.

Arrange and save

Drag a table to move it. Drag a schema’s box to move all its tables with it.

Choose Save diagram and enter a name to save a new diagram. A saved diagram keeps its layout. After changes, its header shows Unsaved changes; choose Save. Leaving with unsaved changes asks first.

  • Change changes what is drawn. On a saved diagram, it keeps the tables’ places.
  • Refresh reads the database again, keeping the tables’ places.
  • Rename and Delete act on the saved diagram.

Export

Choose Export:

Menu Choice Result
Image SVG, PNG An image file of the diagram
Text Mermaid (.mmd) A Mermaid file
Copy Mermaid Mermaid on the clipboard, to paste into Markdown, Notion or Lucid’s Mermaid import
DBML (.dbml) A DBML file
Lucidchart Open in Lucidchart A new Lucidchart document, opened in your browser. Needs a Lucid connection.
Open the last Lucidchart document The document made last time
Download .lucid file A file to import in Lucidchart with File › Import. Needs no Lucid connection.
Lucid connection… The Lucid connection settings

Connect Lucid

Open in Lucidchart needs a Lucid account connection. File exports work without it. Open it with Connect Lucid on the ERDs page, or Export > Lucidchart > Lucid connection….

There are two ways to connect.

API key

A personal API key acts as you, with no sign-in. When set, it is used instead of OAuth.

  1. In the Lucid developer portal, create an API key with the DocumentEdit grant.
  2. In Lucid connection, open the API key tab.
  3. Paste the key into API key and choose Save key.

Choose Remove key to remove it.

Lucid app (OAuth)

  1. In the Lucid developer portal, create an app with an OAuth 2.0 client.
  2. In Lucid connection, open the Lucid app (OAuth) tab.
  3. Enter the Client ID and Client secret.
  4. Register the Redirect URI on the app’s OAuth 2.0 page, exactly as shown. Choose Copy to copy it. Leave the field empty to use Parallax’s own address.
  5. Choose Save and sign in to Lucid and finish signing in in your browser.

If Lucid will not accept Parallax’s redirect address, use Lucid’s test redirect, https://lucid.app/oauth2/clients/<client id>/redirect. Lucid then shows a code: paste it into Code from Lucid and choose Connect.

Choose Disconnect to disconnect.

The client secret and API key are stored encrypted for your Windows account. They can also come from the environment variables PARALLAX_LUCID_CLIENT_ID, PARALLAX_LUCID_CLIENT_SECRET and PARALLAX_LUCID_API_KEY; the dialog then shows them as set by the environment.

Deleting a diagram in Parallax does not affect its Lucidchart document.