This plugin should be used as-is, as an unsupported example for developers.

Insert SQL code using the SQL plugin to automatically generate entity shapes, including their attributes, as well as their primary and foreign keys. To complete your entity relationship diagram, connect the entities together and set the connector ‘arrows’ to describe their relationships.

Load the SQL plugin

Create an ER diagram from SQL code

As SQL and MySQL are the most popular languages used to program and work with relational database systems, has made it easy to automatically create your diagrams from your code.

  1. Click Arrange > Insert > From SQL.
  2. Copy and paste your SQL code into the dialog, then click Insert MySQL or Insert SQL Server, whichever matches the code you just pasted.
  3. Your SQL code is converted into entities containing the attributes, as well as the primary and foreign keys your code defines.
  4. Connect the entities and choose the ‘arrow’ shape that defines the relationship.

Tip: To see the various entity relationship styles, enable the Entity Relation shape library (via More Shapes in the left panel), then hover over the various connector shapes to show their descriptions.

Permanently load the plugin

If you want to always use the sql plugin, add it to the plugins list so it will be loaded each time you create or edit a diagram.

  1. From the menu, select Extras > Plugins.
  2. Click Add.
  3. Select sql in the drop-down list of built-in plugins, then click OK.
  4. Click Apply.

Reload your browser tab to load the plugin into the diagram editor.

Note: Plugins are not supported in for Confluence.