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

database-designer

하는 일

정규화, 인덱스, 데이터 타입, 이름 규칙을 기준으로 데이터베이스 스키마를 분석하고, 안전한 마이그레이션을 계획하도록 돕습니다. 데이터베이스를 설계하거나 개선하는 아키텍트와 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓테이블 정의를 쓰기 전에 데이터베이스 스키마를 설계할 때.
  • ✓프로젝트에 SQL과 NoSQL 중 무엇을 쓸지 골라야 할 때.
  • ✓데이터베이스가 느려서 인덱스를 검토하고 싶을 때.

스킬 링크

https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/database-designer/SKILL.md

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

사용 방법

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

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

Use this skill to help me: https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/database-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 Designer - POWERFUL Tier Skill

Overview

A comprehensive database design skill that provides expert-level analysis, optimization, and migration capabilities for modern database systems. This skill combines theoretical principles with practical tools to help architects and developers create scalable, performant, and maintainable database schemas.

Core Competencies

Schema Design & Analysis

  • Normalization Analysis: Automated detection of normalization levels (1NF through BCNF)
  • Denormalization Strategy: Smart recommendations for performance optimization
  • Data Type Optimization: Identification of inappropriate types and size issues
  • Constraint Analysis: Missing foreign keys, unique constraints, and null checks
  • Naming Convention Validation: Consistent table and column naming patterns
  • ERD Generation: Automatic Mermaid diagram creation from DDL

Index Optimization

  • Index Gap Analysis: Identification of missing indexes on foreign keys and query patterns
  • Composite Index Strategy: Optimal column ordering for multi-column indexes
  • Index Redundancy Detection: Elimination of overlapping and unused indexes
  • Performance Impact Modeling: Selectivity estimation and query cost analysis
  • Index Type Selection: B-tree, hash, partial, covering, and specialized indexes

Migration Management

  • Zero-Downtime Migrations: Expand-contract pattern implementation
  • Schema Evolution: Safe column additions, deletions, and type changes
  • Data Migration Scripts: Automated data transformation and validation
  • Rollback Strategy: Complete reversal capabilities with validation
  • Execution Planning: Ordered migration steps with dependency resolution

Tool Workflow (run these — do not analyze schemas by hand)

All paths relative to this skill folder; sample inputs in assets/.

1. Analyze the schema

python3 schema_analyzer.py --input schema.sql --generate-erd --output-format json -o analysis.json

Accepts SQL DDL or JSON schema (assets/sample_schema.sql / sample_schema.json). Output includes normalization findings, missing constraints, naming issues, and a Mermaid ERD — show the ERD to the user and fix flagged issues before optimizing.

2. Optimize indexes against real query patterns

python3 index_optimizer.py --schema assets/sample_schema.json --queries assets/sample_query_patterns.json --analyze-existing --format json -o indexes.json

Write the user's hot queries into a query-patterns JSON first (copy assets/sample_query_patterns.json). Output is a priority-ordered list of CREATE INDEX recommendations plus redundant-index removals.

3. Generate the migration

python3 migration_generator.py --current current_schema.json --target target_schema.json --zero-downtime --format sql -o migration.sql

--zero-downtime emits an expand-contract plan; --validate-only checks feasibility without generating SQL.

4. Verification loop

Re-run step 1 on the target schema and assert the issues found in the first pass are gone; run migration_generator.py --validate-only before handing over the migration.

Database Design Principles

→ See references/database-design-reference.md for details

Best Practices

Schema Design

  1. Use meaningful names: Clear, consistent naming conventions
  2. Choose appropriate data types: Right-sized columns for storage efficiency
  3. Define proper constraints: Foreign keys, check constraints, unique indexes
  4. Consider future growth: Plan for scale from the beginning
  5. Document relationships: Clear foreign key relationships and business rules

Performance Optimization

  1. Index strategically: Cover common query patterns without over-indexing
  2. Monitor query performance: Regular analysis of slow queries
  3. Partition large tables: Improve query performance and maintenance
  4. Use appropriate isolation levels: Balance consistency with performance
  5. Implement connection pooling: Efficient resource utilization

Security Considerations

  1. Principle of least privilege: Grant minimal necessary permissions
  2. Encrypt sensitive data: At rest and in transit
  3. Audit access patterns: Monitor and log database access
  4. Validate inputs: Prevent SQL injection attacks
  5. Regular security updates: Keep database software current

Query Generation Patterns

SELECT with JOINs

-- INNER JOIN: only ma
자주 묻는 질문

기존 스키마를 점검하나요?

네. 정규화 문제, 인덱스 공백, 중복 인덱스를 찾습니다.

마이그레이션 계획도 도울 수 있나요?

네. 무중단 마이그레이션 계획을 다룹니다.

다이어그램도 그리나요?

네. 스키마에서 엔티티 관계 다이어그램을 생성할 수 있습니다.

상세 정보

작성자의 원본 설명

Use when designing a database schema, choosing SQL vs NoSQL, modeling relationships or planning a data migration, before writing DDL. Applies normalization, index strategy and a database selection decision tree.

repo: alirezarezvani/claude-skills

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬