Where to get the SQL
PostgreSQL: pg_dump --schema-only. MySQL: mysqldump --no-data. SQL Server: Generate Scripts in Management Studio, schema only.
Paste the CREATE TABLE statements from a schema dump and get an entity relationship diagram you can drop into GitHub, GitLab, Notion or Obsidian, or a DBML file for dbdiagram.io. The conversion runs entirely in this page, so the SQL never leaves your machine.
What it reads
The converter understands CREATE TABLE with inline and table-level primary keys, unique constraints and REFERENCES clauses, plus the ALTER TABLE ... ADD CONSTRAINT statements that pg_dump, mysqldump and SQL Server Management Studio put at the end of a script. A required foreign key is drawn as a mandatory relationship, a nullable one as optional, and a foreign key that is also unique as one to one.
PostgreSQL: pg_dump --schema-only. MySQL: mysqldump --no-data. SQL Server: Generate Scripts in Management Studio, schema only.
A fenced mermaid block renders on GitHub, GitLab, Notion and Obsidian, and mermaid.live previews it. DBML opens in dbdiagram.io and dbdocs.
Views, functions, triggers, indexes that are not unique, and CHECK constraints. A very large schema produces a diagram too dense to read, so paste the tables that belong together.
The diagram that does not go stale
A diagram converted from a dump is correct until the next migration. Taavik reads the catalog of PostgreSQL, MySQL, SQL Server and Redshift through an agent inside your network, draws the schema map on every scan, and exports the same diagram as Mermaid, DBML or SQL whenever you need it, together with a data dictionary and a history of every schema change. The free plan covers one database connection.
FAQ
No. The conversion is plain JavaScript running in this page. Nothing is sent to a server, which you can confirm in the network tab of the browser developer tools.
CREATE TABLE and ALTER TABLE statements from PostgreSQL, MySQL and MariaDB, and SQL Server, including quoted, backtick and bracketed identifiers and GO batch separators.
Each foreign key becomes a line from the referenced table to the referencing one. A NOT NULL foreign key is mandatory, a nullable one is optional, and a foreign key that is unique or is the whole primary key is one to one.
Mermaid does not allow spaces or commas in attribute types, so character varying becomes character_varying and numeric(12,2) becomes numeric(12-2). The DBML output keeps the original type.
This page works from SQL text only. Taavik generates the same Mermaid and DBML exports directly from a live database through an on-premises agent, and keeps them current as the schema changes.
Connect one database for free and the schema map, data dictionary and Mermaid export follow every change.