Introduction & Concepts | ERD Generator Docs

ERD Generator is a modern, browser-based tool designed to visualize, design, and manage database schemas efficiently. It combines a powerful visual canvas with a structured text format (DBML), enabling both architects and developers to work faster and with confidence.

Whether you are starting from scratch or importing an existing SQL schema, ERD Generator helps you move seamlessly between code and diagrams.


What is an ERD?

An Entity Relationship Diagram (ERD) visually represents how data is structured in a database:

  • Entities (Tables) represent real-world objects
  • Fields (Columns) describe properties of each entity
  • Relationships define how entities are connected

ERDs are essential for:

  • Database design and planning
  • Team communication and reviews
  • Documentation and onboarding
  • Preventing structural issues early

Core Concepts

Tables

Tables represent database entities such as users, orders, or products.
Each table contains fields, keys, and constraints.

Table users {
  id int [pk, increment]
  email varchar [unique, not null]
  created_at timestamp
}

Fields (Columns)

Fields define the structure of a table.

Common attributes:

  • Primary Key (pk) – uniquely identifies records
  • Foreign Key (fk) – references another table
  • Unique – enforces uniqueness
  • Not Null – required value

Relationships

Relationships define how tables connect.

Supported patterns:

  • One-to-One
  • One-to-Many
  • Many-to-Many (via join tables)
Ref: users.id < orders.user_id

Relationships update visually and in DBML automatically.


SQL ↔ DBML Workflow

Import SQL β†’ Generate ERD

If you already have a SQL schema:

  1. Open SQL β†’ DBML Converter
  2. Paste or upload your SQL script
  3. Review the generated DBML
  4. Instantly visualize the ERD on the canvas

This workflow is ideal for legacy databases and quick audits.


Export DBML β†’ SQL

At any time, you can convert DBML back to SQL:

  • Click DBML β†’ SQL
  • Choose your SQL dialect
  • Copy or download the generated script

Perfect for migrations, CI pipelines, and database updates.


Quick Tour of the Interface

Canvas

  • Drag tables freely
  • Connect relationships visually
  • Zoom, pan, and multi-select
  • Auto-align using layout engines

Layout Options

Choose layouts based on schema complexity:

  • Left β†’ Right
  • Top β†’ Bottom
  • Force Directed
  • Grid

Use Fit to Screen to instantly align everything in view.


Tabs, Folders & Workspaces

Designed for real-world scale:

  • Tabs – multitask across diagrams
  • Folders – organize schemas logically
  • Workspaces – separate projects, teams, or environments

  • Filter visible tables
  • Edit table and field properties
  • Switch table themes
  • Change background colors or patterns (dots, grids)

Themes & Visual Customization

ERD Generator supports:

  • Multiple table themes
  • Light & dark friendly palettes
  • Custom canvas backgrounds
  • Presentation-ready exports

These options help diagrams stay readable in documentation, slides, and reviews.


Keyboard Shortcuts

Power users can move faster with shortcuts:

  • Ctrl / Cmd + S – Save
  • Ctrl / Cmd + B – Emphasis
  • Ctrl / Cmd + Q – Command palette
  • Ctrl / Cmd + 0 – Fit to screen

πŸ‘‰ Open the Help icon to view the complete shortcut list.


Export & Sharing

You can export your work as:

  • PNG / JPG diagrams
  • DBML source
  • SQL scripts

This makes ERD Generator suitable for documentation, collaboration, and production workflows.


  1. Import SQL or start with DBML
  2. Visualize and refine relationships
  3. Apply layouts for clarity
  4. Organize using folders and workspaces
  5. Export diagram or SQL when ready

What’s Next?

  • Learn DBML syntax in detail
  • Explore layout strategies for large schemas
  • Customize themes for presentations
  • Share diagrams with your team

ERD Generator is built to scale with your data β€” from simple schemas to complex systems.