ER diagrams in Moon Modeler

ER diagrams in Moon Modeler are mainly used to visualize database structures. ER diagram (entity-relational diagram), abbreviated as ERD, describes objects in mostly relational databases.
However, Moon Modeler also allows creating diagrams for noSQL databases such as MongoDB, and you can also find support for Mongoose or GraphQL. In this case, we tend to use the term ERD-like visualization or schema design.

Read below about creating ER diagrams in Moon Modeler

The Main diagram and sub-diagrams

Main diagram:

  • Contains all database objects (all schema objects)
  • Objects can be displayed or hidden
Main diagram

Sub-diagram (other diagrams):

  • Contains a subset of objects of the Main diagram
  • Objects can be added to or removed from the diagram, but cannot be hidden

Adding a new diagram

You can click the button Add diagram (1) to create a new, empty diagram. This can be useful if you plan to create a new part of your database design from scratch. If you wish to add already existing objects to a new or existing diagram, select the objects and right-click any of them either in the side panel (2) or on the active diagram (3), and select Add to another diagram (4).

adding a new diagram

Setting the diagram name and properties

If you wish to rename the diagram or set other graphical properties, either right-click the tab name and click Edit to open the modal form or edit the properties directly in the side panel.

manage diagrams

Displaying items from the Main diagram

At bottom of the left side panel, you can find switch Show items from the Main diagram.

show all switch

Enable the switch (1) to display items that exist in the project & the main diagram, but are not in the active diagram. 

The items are displayed as disabled (2). You can right-click any of them and select Add to diagram (3).

Add objects from main diagram to a subdiagram

Diagram items management

If you wish to see a list of all objects, search in the list and add or remove additional objects, right-click the diagram area, and select Manage diagram items.

diagram items

The Diagram items modal form opens. See the objects included (checkbox checked, see 1) and objects that are available for addition. You can also filter the grid by specifying the object name in the Filter input field (2).


Removing objects

If you want to remove an object, you can use the Diagram items modal form, or select the object and press the Del key or click the Delete icon on the toolbar.

Then you can choose to either remove the object from the diagram or delete it from the project.

delete or remove

Adding diagrams by Schemas or by Databases

This feature is available in PostgreSQL, MySQL and MariaDB projects. Right click the Main diagram tab and choose Add diagrams by Schemas or right click the

Diagram by schema - Moon Modeler database reporting tool

A window appears with a selection of schemas for which you want to create a diagram. The result will then be the creation of new diagrams.

Diagrams created from each schema

Changing where tabs are displayed in Moon Modeler

In the Settings, you can select if you want to display the tabs above the diagram or below the diagram.

tabs position

Diagram specific features

  • Diagram specific colors/background colors
  • Objects in each diagram can be formatted differently (color, position, size etc.)
  • Objects alignment and resize
  • Print to PDF
  • Creation of HTML reports for selected diagram
  • Script generation for selected diagram – see below

Generating scripts for a diagram

In case you have multiple ER diagrams in your project, you can generate the resulting script only for the selected diagram.

Generating scripts for a diagram

ER diagram can be created for the following relational databases:


Quick links

Free Trial Buy Now!

Blog categories