By Team Edtoolkits · Data
Check a two-table foreign-key example and understand the difference between parsing a schema and validating a live database.
Use the guide alongside the working tool.
Open ER Diagram from SQL →Try this workflow
CREATE TABLE customers (id INT PRIMARY KEY);
CREATE TABLE orders (id INT PRIMARY KEY, customer_id INT,
FOREIGN KEY (customer_id) REFERENCES customers(id));This schema describes two tables and a foreign-key link from orders.customer_id to customers.id. No SQL is executed.
Use the tool
Paste CREATE TABLE statements, or open a .sql file.
Check the diagram and any notes about missing tables.
Download SVG or PNG, or copy the Mermaid text.
Include both ends of each relationship
Paste the referenced table as well as the table declaring the key. A missing table can leave a warning or an absent edge. Similar column names alone do not declare a foreign key; inspect actual constraints rather than assuming relationships from naming.
Treat the diagram as a parsed subset
Views, indexes and vendor-specific extras may be ignored. Compare columns and key markers against the source before using the diagram in documentation. Export Mermaid for editable diagram source or SVG/PNG for artwork; neither output validates or migrates a live database.
Privacy and limits
Reads standard CREATE TABLE and ALTER TABLE ... FOREIGN KEY statements (MySQL, PostgreSQL, SQLite, SQL Server style). Views, indexes and vendor extras are ignored. Handles up to 60 tables. Your SQL stays on your device and is never executed.
Ready to apply this workflow?
Try ER Diagram from SQL →Explore a related workflow
- SQL Data Explorer: methods and data limits
Query local records with joins, CTEs and window functions.
- Parquet Viewer & Converter: methods and data limits
Inspect local Parquet metadata and export selected records.
- SQLite Database Explorer: methods and data limits
Explore tables, indexes and foreign keys in a local database.
- SQL Dump Extractor: methods and data limits
Extract literal INSERT records without executing backup SQL.
Found unclear instructions or an unexpected result? Contact Team Edtoolkits.