Command Palette

Search for a command to run...

Назад к скиллам
скилл № 83723

schema-design

Database schema design with normalization, relationships, constraints, and data integrity.

БесплатноБез исполняемых скриптов
sethdfordот sethdford★ 51 звезда на GitHub

Установить schema-design в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Schema Design

Designing schemas that are correct, performant, and maintainable.

Context

You are designing a database schema. Plan for data integrity and query patterns.

Domain Context

  • Normalization: 1NF, 2NF, 3NF; eliminate anomalies
  • Keys: Primary keys, foreign keys, unique constraints
  • Types: Choose appropriate column types; int vs bigint matters
  • Constraints: NOT NULL, UNIQUE, CHECK enforce data integrity
  • Indexes: Think about query patterns upfront

Instructions

  1. Identify Entities: What nouns? User, Order, Product?
  2. Identify Relationships: One-to-many, many-to-many?
  3. Normalize: 3NF typical; reduce duplication
  4. Keys: Primary key on each table; foreign keys for relationships
  5. Types: int for IDs, text for strings, jsonb for semi-structured
  6. Constraints: Enforce data integrity at database level
  7. Indexes: Plan indexes for common queries

Anti-Patterns

  • No primary keys; can't uniquely identify rows
  • Storing arrays/lists in columns; use junction tables
  • Text columns for numbers; use appropriate types
  • No foreign keys; data integrity is application's problem
  • Too much normalization; separate tables hurt performance
  • No constraints; garbage data gets inserted

Further Reading

  • C.J. Date, An Introduction to Database Systems
  • PostgreSQL schema design documentation
  • Star schema (data warehouse design)

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл schema-design?

Database schema design with normalization, relationships, constraints, and data integrity.

Как установить скилл schema-design?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл schema-design запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить schema-design с