Import: SQL, DBML & Projects | ERD Generator Docs

Easily bring your existing database schemas into the ERD Generator.
Whether you already have SQL scripts, DBML files, or a saved project, importing lets you instantly visualize, explore, and improve your database design.

This feature is designed for speed, accuracy, and zero setup β€” just import and start working.


πŸš€ What You Can Import

You can import schemas from multiple sources and formats:

🧩 SQL Databases

Import raw SQL schema files from popular databases:

  • MySQL
  • PostgreSQL
  • Microsoft SQL Server
  • Legacy PostgreSQL
  • Legacy SQL Server

Perfect for existing production databases or migration projects.


πŸ“ DBML Files

Already using DBML?
Upload your .dbml files directly and continue editing or visualizing them without any conversion steps.

DBML imports preserve:

  • Tables and columns
  • Relationships
  • Primary & foreign keys
  • Notes and descriptions

πŸ“¦ Saved Projects

Reopen previously saved ERD Generator projects to continue exactly where you left off.

Ideal for:

  • Long-running designs
  • Team collaboration
  • Iterative schema refinement

πŸ”„ What Happens After Import?

No matter what you import, everything is automatically converted into DBML internally.

This means:

  • A single, consistent format
  • Easier editing and visualization
  • Reliable diagram generation
  • Seamless export to SQL or DBML later

You don’t need to worry about formats β€” the tool handles it for you.


🧭 Step-by-Step: How to Import

  1. Open the Import dialog
  2. Choose the source:
    • SQL
    • DBML
    • Project
  3. Select the database type (if importing SQL)
  4. Upload your file or paste your schema
  5. Click Import

That’s it β€” your diagram is ready instantly.


βš™οΈ Import Options Explained

Database Dialect Selection

When importing SQL, choose the correct dialect to ensure accurate parsing:

  • MySQL
  • PostgreSQL
  • SQL Server
  • Legacy variants (for older schemas)

This ensures:

  • Correct data types
  • Accurate constraints
  • Proper relationships

Metadata Handling

During import, you can choose how much detail to include:

  • Table comments
  • Column notes
  • Indexes
  • Constraints

Include everything for full documentation, or keep it minimal for clean diagrams.


🧠 Best Practices for Clean Imports

  • Use schema-only SQL when possible (DDL, not data)
  • Ensure foreign keys are defined for best relationship detection
  • Choose the correct database type before importing
  • For large schemas, import once and refine visually

πŸ” Common Use Cases

  • Reverse-engineer an existing database
  • Migrate schemas between databases
  • Visualize legacy systems
  • Review and refactor complex schemas
  • Generate ER diagrams for documentation or onboarding

❓ Troubleshooting Tips

Tables not connected?
β†’ Ensure foreign keys exist in your SQL.

Unexpected column types?
β†’ Double-check the selected database dialect.

Large schema feels cluttered?
β†’ Use layout options and diagram customization after import.


πŸ” Safe & Private

  • Imports happen entirely in your workspace
  • No schema data is shared or exposed
  • Ideal for private and production databases

βœ… Why Import Instead of Rebuild?

  • Saves hours of manual work
  • Eliminates human error
  • Ensures accuracy with real schemas
  • Instantly creates a visual understanding of your database

🎯 Next Steps

After importing, you can:

  • Customize the diagram layout
  • Edit DBML directly
  • Export to SQL or DBML
  • Share diagrams with your team

Start by importing β€” everything else builds on top of it.