Convert SQL to PNG
Turn SQL files into PNG. A picture at 96 dpi.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop SQL files on the dialor turn it to pick what to do
A diagram of your tables and their keys.Each table is a box, and each foreign key is a line between boxes.
What you get
A PNG picture at 96 dpi of an entity relationship diagram, laid out left to right. Each table is a box headed by its name. The box lists its columns in order with their declared types, and it marks NOT NULL and generated columns.
Primary keys are marked PK and foreign keys are marked FK. Tables that have no keys between them are set out in a grid.
How keys are drawn
Each foreign key is a line from its column to the column it references. A crow's foot sits on the side that can repeat. A bar or a circle tells whether the key is required.
If a key names a table that the file does not have, that table is drawn with a dashed border.
Column types and dialects
The script is first replayed into SQLite. A dump from MySQL, MariaDB or PostgreSQL is rewritten into SQLite's dialect, so column types are the nearest SQLite ones that keep their name and size, such as varchar(255) or decimal(10,2). ENUM, SET, JSON and arrays show as text.
Keys added after the data are kept. Views, functions and triggers are left out.
When it stops
A file with no tables stops with
unsupported_elements. A schema of more than 250 tables or 5,000 columns stops withresource_limit.
SQL and PNG.What each format is.
The formats
SQL Script
SQL statements as text. A database dump that any SQL tool can read or replay.
- Extensions
- .sql
- MIME type
- application
/sql - Kind
- Text and data
PNG
Lossless raster images with an alpha channel. Screenshots, icons and graphics with sharp edges.
- Extensions
- .png
- MIME type
- image
/png - Kind
- Images
In your code.The same SQL to PNG conversion through the API, for your app or your agent.
$ cv convert report.sql report.png$ cv convert report.sql report.pngQuestions.What people ask about SQL to PNG.
No. The picture shows tables, columns and keys. It does not show rows.
A foreign key names that table, and the file does not have it.
Yes. MySQL, MariaDB and PostgreSQL dumps are rewritten into SQLite's dialect before the diagram is drawn.
No. Views, functions and triggers are left out of the diagram.