database-schema-design
This skill guides you through the complete lifecycle of database schema design, from conceptual modeling and logical design through physical optimization and safe migrations. It covers normalization principles, relationship patterns, indexing strategies, and query optimization techniques, with decision tables for choosing between SQL, document, and key-value storage engines. Includes zero-downtime migration patterns and backfill strategies to evolve schemas safely in production.
Database Schema Design helps you create normalized, performant schemas with proper relationships, constraints, and safe migrations.
AI-generated summary based on this skill's SKILL.md
Install
Pixel-Process-UG/superkit-agents/database-schema-design · repository language: TypeScript
git clone https://github.com/Pixel-Process-UG/superkit-agents
cp -r superkit-agents/templates/skills/database-schema-design ~/.claude/skills/database-schema-designnpx skillfed install Pixel-Process-UG/superkit-agents/database-schema-designFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I design a database schema?
database-schema-design guides you through conceptual modeling, logical design, and physical optimization. Start by identifying entities and their relationships, apply normalization principles to eliminate redundancy, define primary and foreign keys, and add constraints. The skill covers relationship patterns (one-to-one, one-to-many, many-to-many), denormalization trade-offs, and indexing strategies to balance query performance with storage efficiency.
What are database schema design best practices?
database-schema-design emphasizes normalization to reduce data anomalies, explicit relationship definitions with foreign keys, appropriate constraint enforcement, and strategic indexing. Key practices include avoiding N+1 query patterns, choosing composite indexes wisely, designing for your access patterns, considering multi-tenancy isolation early, and planning schema evolution. Document your design decisions and validate them against real query workloads.
SQL vs NoSQL—which should I use?
database-schema-design provides decision tables to guide your choice. Use SQL for structured data with complex relationships, ACID requirements, and evolving schemas. Choose NoSQL (document stores) for flexible schemas, horizontal scaling, and denormalized data patterns. Key-value stores suit caching and sessions. Consider your consistency needs, query patterns, team expertise, and growth trajectory. The skill covers schema design patterns specific to each engine.
How do I create database migrations safely?
database-schema-design covers zero-downtime migration patterns and rollback strategies. Deploy schema changes separately from application code, use feature flags to gate new columns, backfill data in batches to avoid locking, and maintain dual-write periods during transitions. Always test migrations on production-like data volumes, monitor performance impact, and keep rollback procedures documented and practiced.
What indexing strategy improves database query performance?
database-schema-design teaches query pattern analysis to identify hot paths, then covers single-column indexes for WHERE and JOIN conditions, composite indexes for multi-column filters, and covering indexes to enable index-only scans. Avoid over-indexing—each index slows writes. Monitor slow query logs, use EXPLAIN plans to validate index usage, and regularly remove unused indexes. Balance read optimization against write costs.
Should I normalize or denormalize my database?
database-schema-design explains normalization principles (1NF through 3NF) to eliminate anomalies and redundancy, then covers denormalization trade-offs. Normalize by default for data integrity and storage efficiency. Denormalize strategically when query performance analysis shows repeated joins are bottlenecks, but accept increased storage and update complexity. Document denormalization decisions and validate them against real workloads before committing.
SKILL.md
rendered from the published skill — quoted content, verbatim
Database Schema Design
Overview
Guide the design, implementation, and optimization of database schemas with sound data modeling, safe migrations, effective indexing, and appropriate query patterns. This skill covers the full lifecycle from conceptual modeling through physical optimization, ensuring schemas that are normalized, performant, and safely evolvable.
Announce at start: "I'm using the database-schema-design skill to design the database schema."
Phase 1: Discovery and Conceptual Model
Ask these questions to understand the data requirements:
| # | Question | What It Determines |
|---|---|---|
| 1 | What entities does the system manage? | Table names |
| 2 | What are the relationships between entities? | Foreign keys, join tables |
| 3 | What are the key attributes of each entity? | Column definitions |
| 4 | What are the primary query patterns? | Index strategy |
| 5 | What is the expected data volume? (rows, |
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 1 file
templates/skills/database-schema-design/SKILL.md