Skip to content

Export ​

Excel, HTML, image, dictionary, translation dictionary, test data and Java exports; DBML, Mermaid, Markdown and model JSON exports; and page setup and printing. DDL has its own page: DDL.

There is a short introduction in Generate and export DDL in Quick start.

Export menu ​

Choose from File › Export ▸ (canvas right-click › Document › Export ▸ is the same).

ItemWhat it creates
DDL…SQL to run on a database — DDL
Excel…Table documents (.xlsx)
HTML…A static document bundle you can read offline
Image…PNG · JPG · BMP · SVG pictures
Dictionary…The word dictionary as CSV
Translation dictionary…A file of physical name and logical name pairs
Test data…INSERT SQL or DBUnit files
Java…Java class sources (plain Java or JPA Entity)
DBML… · Mermaid… · Markdown document… · Model JSON…Text formats for exchanging with other tools

Common to all of them:

  • Writing to an existing file asks whether to overwrite it.
  • When a file is created, a notice appears at the bottom right of the app window; Open folder opens the folder in File Explorer with that file selected.
  • If the output path stored in the document points outside the document's folder, Relio says "The path stored in the file is outside the document folder." If you received the file from someone else, check that the path is right.
  • If there are warnings, their number is shown and they are kept in the problem list. Long exports can be stopped with Cancel in the progress window.

Excel ​

  • Template — Built-in (Korean — table specification (default_ko) · English (default_en) · Japanese (default_ja) · Chinese (default_zh)), File (a template you pick), or a template registered in Settings › Excel template.
  • A user template is an .xlsx or ERMaster .xls with words and loops sheets and template sheets. The output is always .xlsx; if you choose .xls, it writes .xlsx instead.
  • Category — All or a single category.
  • Include the diagram picture · Use logical names as sheet names.
  • Tables, indexes and so on are created by copying the template sheets. Sheet names are shortened to 31 characters, and (1), (2)… are added when names repeat.

To customize a built-in template, use Save to file… in Tools › Settings › Excel template, edit the file, and register it as a user template. Settings › Excel template

HTML ​

Choose the Output folder, then Include the diagram image · Include category images · Open after saving (index.html). It is a frameless static HTML bundle, so you can open the files directly and nothing connects to the internet. It includes the diagram, tables, columns and indexes.

Image ​

  • The format is chosen by the output file's extension (PNG, JPG, BMP, SVG).
  • The area around all elements is drawn at 100% zoom with a 10px margin on every side. If a side exceeds 16,384px, the image is scaled down and you are told.
  • Turn on Also output an image per category (displayed categories) to create a separate picture for each category. If Category folder is empty, they go into a categories folder next to the output file.
  • Open the file after saving.

Find and selection highlights are not included, and images always use light colors even with a dark theme.

Image export dialog — the output file and the per-category image option
Image export dialog — the output file and the per-category image option

Dictionary ​

Export dictionary (CSV) — Exports the word dictionary as CSV. The columns are physical name, logical name, type and description. Turn on Add a UTF-8 BOM so non-ASCII text such as Korean is not garbled when you open the file directly in Excel.

Translation dictionary ​

Export translation dictionary — Exports the model's physical and logical name pairs as a translation dictionary file (UTF-8, one physical name,logical name pair per line). Set the Dictionary name and Save location (.txt if there is no extension), and check in the preview how many entries are included. Entries that are left out are listed with the count and reason. The dictionary you create is used to fill logical names when importing from a database.

Test data ​

First create the data in Model › Test data…. Model menu › Test data

  • Choose the Test data to export.
  • Format — SQL (INSERT statements) · DBUnit XML · DBUnit Flat XML · DBUnit Excel (.xlsx).
  • Turn on One file per test data set (name.extension) to create a separate file for each data set.

Values containing single quotes or empty values are written so they do not break the SQL.

Java ​

FieldDescription
Output folderPackage folders are created under it.
Package nameFor example com.example.model. Relio tells you if it does not follow Java rules.
Class name suffixFor example Entity. Leave it empty for no suffix.
File encoding
TypePlain Java or JPA Entity (@Entity classes)
Output Hibernate mapping files (.hbm.xml)Plain Java only. Not used with the JPA Entity format.

JPA options (when the type is JPA Entity):

  • Use javax.persistence (off: jakarta.persistence)
  • Use java.util.Date for dates (off: java.time)
  • Add child list fields to parents (@OneToMany)
  • Map foreign keys as value fields, not objects

Text formats (DBML, Mermaid, Markdown, model JSON) ​

Common fields:

  • Scope — All · Category · Selected tables (select them on the canvas first).
  • Output file · Encoding · Use CRLF line endings (Windows).
  • Copy to clipboard — Paste the result without creating a file (DBML · Mermaid · Markdown).
  • Settings are remembered per file on this PC. The document (.erm) is not changed, so exporting does not mark it as changed.
FormatWhat it isFormat options
DBMLThe text format used by dbdiagram.io and other toolsWrite column groups as TablePartial · Write notes as sticky notes
MermaidAn erDiagram that GitHub, Notion and other tools render as a diagramUse logical names as aliases · Wrap in a mermaid code block · Write one file per category
Markdown documentA schema document with a table of contents, a Mermaid diagram, and column, foreign key and index tables for each tableInclude a Mermaid diagram · Include views · Include index and unique key tables · Tables only (no title, table of contents or diagram) · Group by category
Model JSONThe whole model as JSON — for connecting other toolsInclude images (Base64) · Include change history · Exclude layout (position, size, color) · Include a timestamp

Get the JSON Schema that describes the model JSON structure with the command-line relio export json --print-schema. Command line

Mermaid export dialog — scope, format options and Copy to clipboard
Mermaid export dialog — scope, format options and Copy to clipboard

Printing ​

  • File › Page setup… — Orientation (landscape or portrait, landscape by default), Scale %, Paper size (A4 by default), and margins Top · Left · Right · Bottom (cm).
  • File › Print… (Ctrl+P) — The print preview shows the page breaks and page count of the current view (All or a category); Print… sends it to the operating system's print dialog. You can also open Page setup… right from the preview.
  • Printing draws at the page setup scale and splits the diagram over several pages, left to right and top to bottom. It has a white background without the grid.
  • On the canvas, page boundaries are shown as light gray lines for each page size (they are not drawn in exports or printing).

Relio is a separate tool, not affiliated with ERMaster.