Parse CREATE TABLE statements and visualize your database table structure in an easy-to-read format.
Database schema visualization helps you understand the structure of your database tables, including columns, data types, and constraints. This is essential for database design, documentation, and debugging.
| Category | Data Types | Usage |
|---|---|---|
| Numeric | INT, BIGINT, DECIMAL, FLOAT | Numbers, IDs, prices |
| String | VARCHAR, CHAR, TEXT | Names, descriptions, content |
| Date/Time | DATE, DATETIME, TIMESTAMP | Dates, timestamps |
| Boolean | BOOLEAN, TINYINT(1) | True/false values |
| Binary | BLOB, VARBINARY | Images, files |
CREATE TABLE users (
id INT PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(50) NOT NULL UNIQUE,
email VARCHAR(100) NOT NULL UNIQUE,
password_hash VARCHAR(255) NOT NULL,
is_active BOOLEAN DEFAULT TRUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
CREATE TABLE posts (
id INT PRIMARY KEY AUTO_INCREMENT,
user_id INT NOT NULL,
title VARCHAR(200) NOT NULL,
content TEXT,
status ENUM('draft', 'published', 'archived') DEFAULT 'draft',
published_at TIMESTAMP NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
INDEX idx_status (status),
INDEX idx_user_id (user_id)
);