DevToolKits.app
시각화

SQL to ER 다이어그램

CREATE TABLE 문을 파싱하여 Mermaid 형식의 ER 다이어그램을 자동으로 생성합니다. 기밀 유지되는 DB 설계를 브라우저 내에서 안전하게 시각화할 수 있습니다.

가이드: How to use & features

  • Enter or paste SQL `CREATE TABLE` statements into the text area.
  • Click the "Visualize" button to generate and display the ER diagram using Mermaid syntax.
  • Table relationships (Foreign Keys) are automatically extracted from `FOREIGN KEY` or `REFERENCES` clauses.
  • Use the "Copy Mermaid Code" button to save the generated syntax to your clipboard.
  • Your schema data is processed entirely in the browser, ensuring privacy and security.

샘플: Examples

Users and Posts (One-to-Many)

입력 예시

CREATE TABLE users (
  id INT PRIMARY KEY,
  name VARCHAR(50)
);

CREATE TABLE posts (
  id INT PRIMARY KEY,
  user_id INT REFERENCES users(id),
  title VARCHAR(100)
);

출력 예시

erDiagram
    users {
        INT id PK
        VARCHAR(50) name
    }
    posts {
        INT id PK
        INT user_id
        VARCHAR(100) title
    }

    posts }|--|| users : "user_id -> id"

FAQ: FAQ

  • Does it support all SQL dialects?

    It supports standard SQL CREATE TABLE syntax. Some highly specific proprietary vendor extensions may not be fully parsed as it uses a custom regex-based parser.
  • Is my data sent to a server?

    No. All processing is done locally in your browser via JavaScript. Your SQL code never leaves your computer.
  • What if relationships are not showing up?

    Ensure that your statements include FOREIGN KEY or REFERENCES clauses. The tool relies on these constraints to identify and draw relationships.

활용: Common Use Cases

  • Database Documentation

    Quickly visualize and document existing table structures by pasting SQL exports.

  • Schema Design Verification

    Self-check your DDL to ensure that relationships and constraints are correctly defined during the design phase.

  • Team Collaboration

    Share specific sub-system structures with your team using lightweight Mermaid syntax before generating full documentation.

주의: Notes & Limitations

  • Limited SQL Syntax

    Statements other than CREATE TABLE (e.g., stored procedures, triggers, complex INDEX definitions) are ignored.

  • Performance with Large Schemas

    Very large schemas with dozens of tables may significantly impact browser rendering performance.

  • Syntax Errors

    Incomplete or malformed SQL statements (missing parentheses, typos) will result in parsing failures.

erDiagram USERS ||--o{ POSTS : "user_id -> id" USERS { int id PK string name } POSTS { int id PK int user_id string title }

SQL에서 ER 다이어그램 생성

CREATE TABLE 같은 SQL 정의에서 테이블, 컬럼, 관계를 시각화한 ER 다이어그램을 생성합니다. 기존 schema를 이해하거나 데이터베이스 문서를 만들 때 유용합니다.

활용 예시

  • 레거시 schema 파악: SQL을 시각적 구조로 변환합니다.
  • DB 문서화: 리뷰나 가이드용 ER diagram을 만듭니다.
  • 관계 확인: key와 table 간 연결을 살펴봅니다.

SQL에 명시되지 않은 관계나 비즈니스 규칙은 자동으로 알 수 없으므로 수동 검토가 필요합니다.

이 도구의 관련 기사

Recent Articles

도구 소개
2026-05-02

CSV와 JSON 변환: API 연동과 데이터 이전에서 형식을 고르는 방법

CSV와 JSON을 안전하게 변환하기 위한 헤더, 구분자, 값 타입, 중첩 데이터 처리, 실무 활용 흐름을 설명합니다.

도구 소개
2026-05-02

JSON 포맷팅과 검증: API 응답을 안전하게 확인하는 방법

JSON을 보기 좋게 정리하고, 문법 오류와 값의 타입을 확인하며, TypeScript 타입과 Zod, OpenAPI 스키마로 이어지는 실무 흐름을 설명합니다.

개발 이야기
2026-04-06

아무도 아키텍처 다이어그램을 업데이트하지 않는 문제에 대하여

'잠깐, 중간에 서버가 하나 더 있지 않나요?' 누군가 이렇게 물어볼 때 느끼는 그 서늘함. 실시간 웹 기반 Mermaid 인프라 시각화 도구를 만들게 된 이야기입니다.

개발 이야기
2026-04-05

YAML 지옥에서 정신줄 놓기: 내가 CI/CD 시각화 도구를 만든 이유

GitHub Actions의 'needs' 의존성이 인간의 눈으로 파악하기엔 너무 혼란스러워졌을 때, YAML 미로를 깔끔한 순서도로 바꾸기로 결심했습니다.

개발 이야기
2026-04-04

JOIN 때문에 울지 마세요: 비주얼 SQL 빌더 개발 비화

'잠깐, LEFT JOIN이 어떻게 작동하더라?' 쉼표 누락이나 구문 오류를 디버깅하느라 시간을 낭비하지 않도록 이 노코드 SQL 도구를 만들었습니다.

개발 이야기
2026-03-09

재귀로 푸는 JSON→TypeScript 변환: 외부 라이브러리에 의존하지 않는 강점

API 응답에서 순식간에 타입 정의를 생성. 외부 파서 없이 재귀 알고리즘으로 가볍고 빠르게 구현한 뒷이야기를 소개합니다.