What is Entity Relationship Diagram (ERD)?

Entity relationship diagram describes the structure of the database. The entity relationship diagram shows entities (tables in relational databases) and relationships between tables that exist in the database. For a good database design, it is very important to have an entity relationship diagram.

In an entity relationship diagram, the basic elements are:

  • Entities (tables)
  • Attributes (table columns)
  • Relationships (relationships between tables)

Why create entity relational diagrams?

There can be several reasons, ranging from the ease and convenience of creating new database designs, to diagramming and documenting existing database structures. Of course, one of the main benefits is easier communication, as the relationships are usually more visible in an ER diagram and the database structure becomes clearer to understand.

Entity relationship diagram

entity relationship diagram

Extension of entity relationship diagrams and visualization of nested objects

In many cases, entities, attributes, and sessions in an ER diagram are sufficient, but the increasing popularity of data stored in databases in formats that have their own structure, such as JSON, makes visualization of these JSON structures also desirable. In Moon Modeler, JSON structures can be displayed directly in entity relationship diagrams.

In projects for relational databases, JSON can be visualized. In schema designs for MongoDB, embedded documents/nested objects can be either shown or hidden.

entity relationship diagram and nested objects

Creating entity relationship diagrams in Moon Modeler

New database structures

You can use Moon Modeler to create new database structures. Design new objects visually, add new objects to ER diagrams, and simply draw relationships between objects.

Visualize existing database structures

If you already have an existing database, you can create a connection in Moon Modeler and run reverse engineering to retrieve information about entities, attributes, and relationships. The result will then be a new entity relationship diagram. In this new ER diagram you can change the layout of the graphical elements, you can add additional annotations and graphical elements used to better explain and understand the structure.

Generating SQL and creating documentation

If you have already created an ER diagram, you can generate an SQL script for the structure. You can run this script in your favorite scripting program to physically create a new database.

Another option is to generate documentation. Moon Modeler allows you to generate an interactive HTML report that contains both an entity relationship diagram and a tabular summary of all objects. The report can be searched and the detail of each object can be displayed.

For which databases can you create entity relationship diagrams in Moon Modeler?

Supported relational databases

NoSQL databases and other platforms

Get started today and try Moon Modeler – ER diagram tool!

Download Read Quick Start Guides