Chalkline / Features / SQL to ER diagram

Databases

From SQL to a database diagram, and back

Your schema already describes the diagram. Chalkline reads tables, keys and foreign keys and draws them, with the right crow's foot ends.

No account · Works offline · Your drawings never leave this device

Reads the SQL you have

Primary keys, unique columns, inline references, table constraints and ALTER TABLE foreign keys, with the quoting of PostgreSQL, MySQL, SQLite and SQL Server.

  • A foreign key is many to one; a unique one is one to one
  • Nullable foreign keys draw as optional ends

Moves stay put

Rearrange the tables, change the SQL and apply again. Tables keep the places you gave them.

  • Paste SQL straight onto the board to draw it
  • Open a .sql file from your computer

Back to SQL

Draw or edit tables and the lines between them, then copy or save CREATE TABLE statements with the keys filled in.

  • Copy SQL or save a .sql file
  • Also exports to SVG, PDF, PowerPoint and draw.io

Questions

Good to know

PostgreSQL, MySQL, SQLite and SQL Server style CREATE TABLE and ALTER TABLE statements.

Yes. Use Copy SQL or Save SQL in the Database tab of Diagram as text.