SQLQueryBot
/
Schema Visualizer
Join waitlist
Paste your CREATE TABLE statements
CREATE TABLE users ( id SERIAL PRIMARY KEY, email VARCHAR(255) NOT NULL, name VARCHAR(100), created_at TIMESTAMP DEFAULT NOW() ); CREATE TABLE posts ( id SERIAL PRIMARY KEY, title VARCHAR(500) NOT NULL, body TEXT, user_id INTEGER NOT NULL, created_at TIMESTAMP DEFAULT NOW(), FOREIGN KEY (user_id) REFERENCES users(id) ); CREATE TABLE comments ( id SERIAL PRIMARY KEY, body TEXT NOT NULL, post_id INTEGER NOT NULL, user_id INTEGER NOT NULL, created_at TIMESTAMP DEFAULT NOW(), FOREIGN KEY (post_id) REFERENCES posts(id), FOREIGN KEY (user_id) REFERENCES users(id) );
Visualize →
Load example
users
PK
id
SERIAL
email
VARCHAR(255)
name
VARCHAR(100)
created_at
TIMESTAMP
posts
PK
id
SERIAL
title
VARCHAR(500)
body
TEXT
FK
user_id
INTEGER
created_at
TIMESTAMP
comments
PK
id
SERIAL
body
TEXT
FK
post_id
INTEGER
FK
user_id
INTEGER
created_at
TIMESTAMP
Mini Map
React Flow
Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.