A diagram is most useful when it can become real tables. Schemity exports your ERD as DDL - the CREATE statements that build the schema in your database.
What export formats does Schemity support?
From the export menu you can save the current diagram as:
- PNG - a raster image with transparency.
- JPEG - a smaller raster image.
- SVG - vector output with selectable text that scales infinitely.
- SQL - a plain-text file of all the CREATE statements for the whole diagram.
- DBML - a schema definition file for dbdiagram.io and the wider DBML toolchain.
- Mermaid - an erDiagram file that Mermaid-enabled platforms render as a diagram.
How do I generate DDL from my ERD?
Choose the SQL export to generate engine-aware DDL for the connection’s database type, emitting:
CREATE TABLEstatements with columns, types, and nullability- Primary keys, including composite keys
- Foreign keys that match your relationships
- Unique and check constraints, and indexes
Does the generated SQL match my database engine?
The output respects your target engine. Data types, default-value syntax, and constraint formatting follow PostgreSQL, MySQL, SQL Server, or SQLite conventions, so the SQL is ready to run on the database you actually use.
Can I export SQL without a live connection?
DDL generation does not need a live connection. Even a diagram you designed with Conn method: None exports a complete SQL script you can run elsewhere - a fresh environment, a test database, or a new service.
Can I export my ERD as a Mermaid diagram?
Yes. Choose the Mermaid export to save the diagram as a Mermaid erDiagram file. Paste its content into a fenced ```mermaid block in any Mermaid-enabled platform - GitHub, GitLab, Notion, Obsidian - and the platform renders the schema as a vector diagram, straight from the markdown. Because the diagram is text inside the document, schema updates show up as a readable diff instead of a replaced image.
Note that Mermaid carries entities and relationships, not your canvas layout - the renderer arranges the diagram itself. When the arrangement matters, export SVG instead.
Should I commit the generated SQL to Git?
Commit the generated SQL alongside the JSON diagram. Reviewers then see both the visual change and the exact SQL in the same pull request.
Next
Evolve an existing database safely with Migration SQL Diff.