Turn a SQL script into a diagram.
Paste the CREATE TABLE script from SQL Server, PostgreSQL or MySQL. Get a diagram you can rearrange, a review of keys, indexes and types, and a Mermaid copy for your docs.
Customers
- PKIdint
- UQEmailnvarchar(255)
- FullNamenvarchar(200)
- Phone?varchar(30)
- CreatedAtdatetime2
Addresses1
- PKIdint
- FKCustomerIdint
- Line1nvarchar(200)
- Citynvarchar(100)
- Countrychar(2)
products2
- PKidserial
- UQskuvarchar(40)
- namevarchar(200)
- unit_pricefloat
- category_id?int
- launched_on?varchar(20)
categories1
- PKidserial
- namevarchar(100)
- FKparent_id?int
Orders1
- PKIdint
- FKCustomerIdint
- FKAddressId?int
- Statusvarchar(20)
- Totaldecimal(19,4)
- PlacedAtdatetime2
order_items3
- FKorder_idint
- FKproduct_idint
- quantityint
- pricereal
payment2
- PKidbigserial
- FKorder_idint
- FKinvoice_id?int
- amountnumeric(19,4)
- paid_at?timestamptz
85%
Schema only
Export the structure without data. In SQL Server: Generate Scripts → Schema only. In PostgreSQL: pg_dump --schema-only.
What the review checks
Missing primary keys, foreign keys without indexes or constraints, money stored as floating point, dates stored as text, mixed naming.
Diagrams that stay current
Paste the Mermaid version into your repository's README and it renders on GitHub and GitLab.