ERD Designer

Enterprise manager provides a visual interface for creating entity relationship diagrams (ERD) and for observing existing database schemas, so you can quickly understand table relationships, identify dependencies, and visually assess the impact of schema changes before implementation.

This procedure outlines the steps required to access and utilize the ERD Designer within the Workspace section of Enterprise Manager UI.

  1. From the main Workspace screen, click the "Run Queries" card.

  2. In the "Connect to..." dialog, select your target server, enter your credentials, and click Connect.

  3. Upon successful connection, the main ERD worksheet will appear.

Creating ERD diagram

1

Initiate generation

  1. From the ERD Worksheet On ERD Designer worksheet, click Generate ERD

  1. From the Query Editor In the Query Editor, right-click on a schema name in the Schemas Sidebar and select the "Generate ERD" option.

2

Select schema, and tables

A dialog will appear. Choose the specific schema you want to visualize. You may select which tables within that schema to include in the diagram.

3

Visualize

Click the Visualize button to generate and display the ERD on the worksheet canvas.

ERD Worksheet Features

The core of the designer is a visual canvas where you can build and manage your database structures.

Model Tables, Indexes, and Relationships

You can graphically manage all core MariaDB schema objects.

Create New Tables

Use the toolbar or right-click on the canvas to add new table entities to your diagram.

Edit Entities

Double-click any table to open the Entity Editor at the bottom of the screen.

Here, you can define and modify columns (including data types and NOT NULL constraints), indexes, and foreign keys through an intuitive interface.

Draw Foreign Keys

To create a new relationship, simply click the connection point on a column in one table and drag it to the column it references in another table.

Auto Layout

For large or complex schemas, the diagram can become cluttered. Use the Auto Arrange Entities feature, typically found in the top toolbar, to automatically rearrange the tables and relationships into a clean, organized, and easily navigable diagram.

Working with the ERD Worksheet

The ERD worksheet provides several tools and shortcuts to streamline your workflow.

Managing Foreign Keys

Right-click on a relationship link between two tables to open a context menu with quick actions, such as editing or removing the foreign key, toggling the relationship type (e.g., one-to-one vs. one-to-many), and changing NOT NULL constraints.

Exporting Your Model

Once your design is complete, you can export it for documentation or deployment. The export options, found in the toolbar or by right-clicking the canvas, include the following:

  • Export as SQL Script: Generates the CREATE TABLE and ALTER TABLE statements for your entire diagram.

  • Export as JPEG: Creates an image of your diagram for use in presentations or other documents.

  • Copy script to clipboard: A quick way to get the SQL for pasting elsewhere.

Applying Changes to a Database

Click the "Apply Script" button (▶) in the toolbar to execute the generated SQL against your connected database. This allows you to deploy your new or modified schema directly from the designer.

This page is: Copyright © 2025 MariaDB. All rights reserved.

Last updated

Was this helpful?