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.
- Open the import dialog — Choose File › Import › From SQL, DBML, Mermaid or Markdown…. No document needs to be open. Dragging an
.sql,.dbml,.mmdor.mdfile onto the window opens the same dialog. - 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.
- Import into — Choose New document. To add to a model you already have open, choose Merge into the current document.
- Preview — Check how many tables, columns, relationships and indexes were found, and any warnings. Statements that cannot be read are skipped with a warning.
- Import — The model opens in a new untitled tab. Tidy up the table positions, then press Ctrl+S to save it as an
.ermfile.
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