ErdDocs

MySQL data dictionary generator

Paste mysqldump --no-data output and get a data dictionary: every table, column, type, default, index and relationship as one printable document, with the inline COMMENT texts as descriptions. Parsed in your browser — the schema is never uploaded.

Your schema

The example is a MySQL support-desk schema; its COMMENT clauses fill the Description column. The messages table declares no foreign keys — watch its relations arrive dashed, matched by name.

From a MySQL server to a document

  1. 01mysqldump --no-data mydb > schema.sql — structure only, no rows. From Workbench: Server → Data Export → Dump Structure Only.
  2. 02Paste the file above or drop it onto the panel.
  3. 03Read the dictionary, then Save as PDF — the browser’s print dialog is the whole pipeline.

MySQL specifics the parser knows

  • Inline comments, both levels. COMMENT 'text' on columns and COMMENT='text' in table options become descriptions; quotes and '' escapes handled.
  • The dialect’s furniture. Backtick identifiers, unsigned, AUTO_INCREMENT, ENGINE= options, KEY /UNIQUE KEY index clauses — plus gaps in the standard grammar patched from real dumps (Dolibarr’s REAL columns, PrestaShop’s named inline primary keys).
  • Schemas without foreign keys. The MyISAM legacy: WordPress declares zero FKs across its whole schema. Relationships are inferred from column naming, drawn dashed, and counted separately — the dictionary never passes a guess off as a declared key.

FAQ

Is this the same thing as the MySQL 8 data dictionary?

No — MySQL 8 replaced its .frm files with an internal, transactional data dictionary that stores table metadata for the server itself. ErdDocs generates the other kind: a human-readable reference document of your schema for teammates, auditors and clients. The internal dictionary feeds the server; the one ErdDocs writes is the one you print, hand over and keep.

How do I export a MySQL schema for the dictionary?

mysqldump --no-data mydb > schema.sql dumps structure without rows; add --routines if you keep procedures. MySQL Workbench users: Server → Data Export → Dump Structure Only. Paste the result above — everything is parsed in the browser.

Where do the descriptions come from in MySQL?

MySQL keeps them inline: COMMENT 'text' after a column definition and COMMENT='text' among the table options. mysqldump preserves both, and they become the Description column of the dictionary. ALTER TABLE ... COMMENT works too — the comment lands in the next dump either way.

My MySQL dump declares no foreign keys. Will relationships be missing?

ErdDocs recovers them from column naming instead: a user_id column links to the users table, so the diagram still connects rather than falling apart into loose boxes. It is a common case — MyISAM never enforced foreign keys, and WordPress-style schemas declare none to this day. Recovered links are drawn dashed on the diagram and marked "matched by name" in the dictionary, so declared keys and inferred ones are never confused.

What does it cost?

Diagrams up to 25 tables and the dictionary preview are free, no account. One $9 payment unlocks the full dictionary and diagram for schemas of any size — once, not monthly.

Related