Skip to content

Start from SQL or DBML ​

Create a new model from SQL (CREATE TABLE), DBML, Mermaid or Markdown files exported from another tool or a database dump. No database connection is needed.

  1. Open the import dialog — Choose File › Import › From SQL, DBML, Mermaid or Markdown…. No document needs to be open. Dragging an .sql, .dbml, .mmd or .md file onto the window opens the same dialog.
  2. Choose the input — Choose File and pick a file with Browse…, or choose Paste and paste the text as it is. The format and SQL dialect are detected automatically, so you can usually leave them alone.
  3. Import into — Choose New document. To add to a model you already have open, choose Merge into the current document.
  4. Preview — Check how many tables, columns, relationships and indexes were found, and any warnings. Statements that cannot be read are skipped with a warning.
  5. Import — The model opens in a new untitled tab. Tidy up the table positions, then press Ctrl+S to save it as an .erm file.

Tip

A merge into the current document is undone in one step with Ctrl+Z. For objects whose names already exist, choose Overwrite, Skip or Add with a new name.

To connect to a live database and import its structure, see Import from and apply to a database.

More → Import and other formats · Command line › relio import

Relio is a separate tool, not affiliated with ERMaster.