본문으로 건너뛰기
Skillpedia
데이터베이스33k · #8748

database-schema-designer

하는 일

이 스킬은 AI 에이전트가 데이터베이스 테이블과 데이터 모델을 설계하도록 돕습니다. 구조, 인덱스, 제약 조건, 마이그레이션을 다룹니다. 새 앱을 위한 건전한 데이터 모델이 필요한 개발자와 창업자를 위한 것입니다.

사용하는 경우

  • ✓온라인 상점이나 블로그 같은 새 앱에 데이터베이스 스키마가 필요할 때.
  • ✓기존 데이터 모델에 인덱스 누락 같은 약점이 있는지 확인하고 싶을 때.
  • ✓프로젝트에 SQL과 NoSQL 중 무엇을 쓸지 고르면서 명확한 구조를 원하는 경우.

스킬 링크

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/database-schema-designer/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/database-schema-designer/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“사용자, 제품, 주문이 있는 온라인 상점의 데이터베이스 스키마를 설계해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 저장하려는 데이터에 대한 설명을 받아 키, 관계, 인덱스가 있는 테이블을 만듭니다. 설계 이유를 쉬운 말로 설명하므로 설계를 조정할 수 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Database Schema Designer

Design production-ready database schemas with best practices built-in.


Quick Start

Just describe your data model:

design a schema for an e-commerce platform with users, products, orders

You'll get a complete SQL schema like:

CREATE TABLE users (
  id BIGINT AUTO_INCREMENT PRIMARY KEY,
  email VARCHAR(255) UNIQUE NOT NULL,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE orders (
  id BIGINT AUTO_INCREMENT PRIMARY KEY,
  user_id BIGINT NOT NULL REFERENCES users(id),
  total DECIMAL(10,2) NOT NULL,
  INDEX idx_orders_user (user_id)
);

What to include in your request:

  • Entities (users, products, orders)
  • Key relationships (users have orders, orders have items)
  • Scale hints (high-traffic, millions of records)
  • Database preference (SQL/NoSQL) - defaults to SQL if not specified

Triggers

Trigger Example
design schema "design a schema for user authentication"
database design "database design for multi-tenant SaaS"
create tables "create tables for a blog system"
schema for "schema for inventory management"
model data "model data for real-time analytics"
I need a database "I need a database for tracking orders"
design NoSQL "design NoSQL schema for product catalog"

Key Terms

Term Definition
Normalization Organizing data to reduce redundancy (1NF → 2NF → 3NF)
3NF Third Normal Form - no transitive dependencies between columns
OLTP Online Transaction Processing - write-heavy, needs normalization
OLAP Online Analytical Processing - read-heavy, benefits from denormalization
Foreign Key (FK) Column that references another table's primary key
Index Data structure that speeds up queries (at cost of slower writes)
Access Pattern How your app reads/writes data (queries, joins, filters)
Denormalization Intentionally duplicating data to speed up reads

Quick Reference

Task Approach Key Consideration
New schema Normalize to 3NF first Domain modeling over UI
SQL vs NoSQL Access patterns decide Read/write ratio matters
Primary keys INT or UUID UUID for distributed systems
Foreign keys Always constrain ON DELETE strategy critical
Indexes FKs + WHERE columns Column order matters
Migrations Always reversible Backward compatible first

Process Overview

Your Data Requirements
    |
    v
+-----------------------------------------------------+
| Phase 1: ANALYSIS                                   |
| * Identify entities and relationships               |
| * Determine access patterns (read vs write heavy)   |
| * Choose SQL or NoSQL based on requirements         |
+-----------------------------------------------------+
    |
    v
+-----------------------------------------------------+
| Phase 2: DESIGN                                     |
| * Normalize to 3NF (SQL) or embed/reference (NoSQL) |
| * Define primary keys and foreign keys              |
| * Choose appropriate data types                     |
| * Add constraints (UNIQUE, CHECK, NOT NULL)         |
+-----------------------------------------------------+
    |
    v
+-----------------------------------------------------+
| Phase 3: OPTIMIZE                                   |
| * Plan indexing strategy                            |
| * Consider denormalization for read-heavy queries   |
| * Add timestamps (created_at, updated_at)           |
+-----------------------------------------------------+
    |
    v
+-----------------------------------------------------+
| Phase 4: MIGRATE                                    |
| * Generate migration scripts (up + down)            |
| * Ensure backward compatibility                     |
| * Plan zero-downtime deployment                     |
+-----------------------------------------------------+
    |
    v
Production-Ready Schema

Commands

Command When to Use Action
design schema for {domain} Starting fresh Full schema generation
normalize {table} Fixing existing table Apply normalization rules
add indexes for {table} Performance issues Generate index strategy
migration for {change} Schema evolution Create reversible migration
`review schema
자주 묻는 질문

에이전트에게 무엇을 알려 줘야 하나요?

주로 저장할 데이터, 서로의 관계, 예상 데이터 양을 설명해 주시면 됩니다.

기본값은 SQL인가요?

네. 데이터베이스 유형을 지정하지 않으면 스킬은 SQL을 가정합니다.

마이그레이션도 작성하나요?

스킬은 마이그레이션 패턴을 다루므로, 에이전트가 기존 스키마의 변경 계획을 도울 수 있습니다.

상세 정보

작성자의 원본 설명

Design robust, scalable database schemas for SQL and NoSQL databases. Provides normalization guidelines, indexing strategies, migration patterns, constraint design, and performance optimization. Ensures data integrity, query performance, and maintainable data models.

repo: davila7/claude-code-templates

인기도

GitHub 스타
33k
순위
#8748
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬