Convert SQL to PDF
Turn SQL files into PDF. A picture on one page cut to its size, as vectors with selectable text.
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 database schema.One page with every table, its columns and the keys between them.
What you get
A single PDF page cut to the size of the picture. It is an entity relationship diagram laid out left to right, drawn as vectors, and the text in it is selectable.
Each table is a box headed by its name. The box lists the columns in order with their declared types, and it shows NOT NULL and generated columns. Primary keys are marked PK and foreign keys are marked FK.
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. Tables with no keys between them are set out in a grid.
Dumps from other databases
The script is first replayed into SQLite. A dump from MySQL, MariaDB or PostgreSQL is rewritten into SQLite's dialect before it is drawn.
Column types become 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, so they do not appear in the diagram.
Limits
A schema of more than 250 tables or 5,000 columns fails with
resource_limit. A file with no tables fails withunsupported_elements.
SQL and PDF.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
Fixed-layout pages that look the same everywhere. The exchange format for anything that will be printed or signed.
- Extensions
- MIME type
- application
/pdf - Kind
- Documents
In your code.The same SQL to PDF conversion through the API, for your app or your agent.
$ cv convert report.sql report.pdf$ cv convert report.sql report.pdfQuestions.What people ask about SQL to PDF.
No. The diagram shows tables, columns, types and keys. The rows are not drawn.
Yes. MySQL, MariaDB and PostgreSQL dumps are rewritten into SQLite's dialect first, so some column types change to the nearest SQLite ones.
No. Views, functions and triggers are left out.
The file has no tables, so there is nothing to draw. A schema of more than 250 tables or 5,000 columns fails with resource_limit instead.