DiagramPreview
安定レンダラーNo AILocal previewExportSEO tool

SQL to ER Diagram

Paste SQL DDL and visualize tables, columns, primary keys, and foreign key relationships as an ER diagram.

サンプル
ER diagram準備完了
Your ER diagram will appear here.

関連ツールで続ける

このプレビューを近いワークフローに移して、変換、デバッグ、エクスポートを続けます。

DBML to ER Diagram

Convert DBML table definitions and refs into a Mermaid ER diagram.

開く
Prisma Schema Diagram

Convert Prisma model blocks into an ER-style schema diagram.

開く
JSON Schema Visualizer

Inspect JSON Schema properties, types, required fields, and composition groups.

開く

使い方

  1. 1Paste source text into the editor.
  2. 2Review the generated visualization.
  3. 3Edit the input and export the rendered SVG or PNG when the diagram looks right.

主な用途

Database documentationSchema reviewData model onboarding

FAQ

このツールはブラウザで動作しますか?

はい。ほとんどのプレビュー、検証、エクスポートはブラウザ内で行われます。AI ツールは設定された API に prompt のみ送信します。

公開前に何を確認すべきですか?

図やファイルが実際の流れを表しているか、ラベルが読めるか、機密データが除去されているか、SVG/PNG export が review しやすいかを確認してください。

ドキュメント作成にどう役立ちますか?

技術テキストやファイルを review しやすい視覚プレビューに変換し、README、ADR、runbook、issue、API docs からリンクできます。

Convert CREATE TABLE SQL into a Mermaid ER diagram.

Paste SQL DDL and visualize tables, columns, primary keys, and foreign key relationships as an ER diagram.

DiagramPreview keeps the workflow editable so you can revise the source and regenerate the visualization quickly.

Demo: convert CREATE TABLE statements into an ER diagram

SQL schema review becomes faster when tables, primary keys, and foreign keys are visible. The preview helps teams discuss relationships before migrations reach production.

  • Include CREATE TABLE statements for all referenced tables.
  • Keep foreign key constraints in the sample when possible.
  • Use the ER output to review relationships, not query performance.
CREATE TABLE users (id INT PRIMARY KEY, email TEXT);
CREATE TABLE orders (id INT PRIMARY KEY, user_id INT REFERENCES users(id), total DECIMAL);

Review checklist: catch schema relationship mistakes

An ER preview can expose missing foreign keys, many-to-many join tables, and columns that imply a relationship but are not constrained.

  • Look for *_id columns without a matching relationship.
  • Check whether join tables need composite uniqueness.
  • Confirm nullable foreign keys represent a real optional relationship.
order_items(order_id, product_id)
UNIQUE(order_id, product_id)

SQL to ER Diagram のレビューチェックリスト

ドキュメント、PR、障害メモ、引き継ぎの前にソースを視覚的に確認する場合は SQL to ER Diagram を使えます。Convert CREATE TABLE SQL into a Mermaid ER diagram.

エクスポート前に、ラベルの読みやすさ、関係の正しさ、機密情報の有無、編集後のプレビュー整合性を確認してください。

制限とトラブルシュート

プレビューに失敗したら、入力を最小の完全な例に縮小し、構文を確認してから少しずつ戻してください。

プレビューはレビュー面であり、唯一の正解ではありません。重要な出力は人が確認してください。

試せるサンプル入力

  • コマース: CREATE TABLE customers ( id INT PRIMARY KEY, email VARCHAR(255) NOT NULL UNIQUE, name VARCHAR(120) ); CREATE TABLE orders ( id INT PRIMARY KEY, customer_id INT NOT NULL REFERENCES ...
  • ブログ: CREATE TABLE authors ( id INTEGER PRIMARY KEY, display_name TEXT NOT NULL ); CREATE TABLE posts ( id INTEGER PRIMARY KEY, author_id INTEGER REFERENCES authors(id), slug TEXT NOT NU...
  • 請求: CREATE TABLE accounts ( id BIGINT PRIMARY KEY, plan VARCHAR(40) NOT NULL ); CREATE TABLE invoices ( id BIGINT PRIMARY KEY, account_id BIGINT NOT NULL, amount_cents INT NOT NULL, FO...

ツール成熟度

安定レンダラー

安定ツール

このツールは専用のプレビュー、実用的なエクスポート、ブラウザ内で繰り返せる確認フローを備えています。

ラベルは、安定エクスポート、深いデバッグ、素早い解析、AI 支援生成のどれに向くかを示します。