Create Your First Diagram | ERD Generator Docs

This guide walks you through creating your first ER diagram in ERD Generator — from defining tables to exporting a polished visual — in just a few minutes.

You can start from existing SQL or write DBML directly. The diagram updates live as you work.


Two Ways to Start Your Diagram

ERD Generator supports both database-first and schema-as-code workflows.


Option 1: Import SQL and Generate Diagram (Fastest)

If you already have a SQL schema, this is the quickest path.

Steps

  1. Open SQL → DBML Converter
  2. Paste your SQL schema
  3. Review the generated DBML
  4. Instantly see tables and relationships rendered on the canvas

The right-side preview updates automatically — no manual refresh needed.

Ideal for reverse-engineering existing databases.


Option 2: Write DBML Manually (Schema-First)

Prefer defining structure explicitly?

Steps

  1. Create a new DBML file
  2. Define tables and columns
  3. Add relationships between tables
  4. Watch the diagram update in real time

DBML becomes the single source of truth, keeping code and visuals in sync.


Understanding the Live Preview

The canvas on the right is fully interactive:

  • Tables render instantly
  • Relationships appear automatically
  • Errors are reflected immediately
  • Changes stay synchronized with DBML

This tight feedback loop helps you design with confidence.


Creating Tables and Columns

Each table represents a database entity.

Typical workflow:

  • Define table name
  • Add columns and data types
  • Mark primary keys
  • Define constraints

As tables grow, the diagram scales smoothly without clutter.


Defining Relationships

Relationships connect tables logically.

You can:

  • Define foreign keys in DBML
  • See relationship lines appear automatically
  • Understand cardinality at a glance

Complex schemas remain readable even as relationships increase.


Working with the Canvas

The canvas is designed for exploration and refinement.

What you can do

  • Drag tables freely
  • Select and move multiple tables
  • Pan and zoom smoothly
  • Reorganize layouts visually

Auto Layouts

Use layout engines to clean up diagrams instantly:

  • Left → Right
  • Top → Bottom
  • Force Directed
  • Grid

Click Fit to Screen to perfectly center everything.


Filtering Large Diagrams

As schemas grow, focus becomes critical.

Use the right sidebar filter to:

  • Show or hide specific tables
  • Reduce visual noise
  • Focus on a subset of the schema

This is especially useful for large production databases.


Customizing Look & Feel

Make diagrams presentation-ready or easier to read.

Available Customizations

  • Multiple table themes
  • Light & dark friendly color palettes
  • Background colors
  • Grid or dot background patterns

These settings help adapt diagrams for documentation, reviews, or screenshots.


Keyboard Shortcuts for Speed

Power users can move faster with shortcuts:

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

Click the Help icon anytime to see the full list.


Exporting Your Diagram

Once your diagram is ready, you can export it easily.

Export Options

  • PNG
  • JPG

Perfect for:

  • Design reviews
  • Documentation
  • Architecture discussions

You can also export DBML or convert it back to SQL.


Organizing Your Work

ERD Generator scales with your projects.

  • Use tabs to multitask
  • Use folders to organize files
  • Use workspaces to separate domains or teams

This keeps even complex systems manageable.


Summary

By now, you should be able to:

  • Create tables and relationships
  • See live diagram previews
  • Customize layouts and themes
  • Export a clean ER diagram

You’ve created your first ERD — and you’re just getting started.