database-design
Build well-structured database schemas from requirements through deployment. This skill guides you through normalization, relationship design, index optimization, and reversible migrations—covering relational databases like PostgreSQL and MySQL, document stores like MongoDB, and ORMs including Prisma, Drizzle, and TypeORM.
Database Design helps you create normalized schemas with safe migrations and optimized queries across relational and document databases.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-07-05
Database Design helps you create normalized schemas with safe migrations and optimized queries across relational and document databases. Build well-structured database schemas from requirements through deployment. This skill guides you through normalization, relationship design, index optimization, and reversible migrations—covering relational databases like PostgreSQL and MySQL, document stores like MongoDB, and ORMs including Prisma, Drizzle, and TypeORM.
Use it when
- database-design teaches reversible migration strategies that minimize downtime and risk.
- database-design covers query optimization by teaching you to analyze execution plans, identify missing or inefficient indexes.
Verify before relying
Read SKILL.md below before installing (9 files). Open directory: indexed for reading, not audited.
Install
srstomp/pokayokay/database-design · repository language: Shell
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I design a database schema that follows best practices?
database-design guides you through schema creation by starting with normalization principles to eliminate redundancy, then defining clear relationships (one-to-many, many-to-many) with proper foreign keys and constraints. The skill covers entity-relationship modeling, choosing appropriate data types, and planning for indexing needs upfront. You'll learn to review your design against integrity requirements before implementation, whether you're building for PostgreSQL, MySQL, MongoDB, or another store.
What's the safest approach to database migrations in production?
database-design teaches reversible migration strategies that minimize downtime and risk. Key practices include writing migrations that can be rolled back, deploying schema changes separately from application code, and using zero-downtime techniques like adding columns as nullable before backfilling. The skill covers migration tooling within ORMs like Prisma, Drizzle, and TypeORM, plus standalone migration runners, so you can execute changes safely across environments.
How can I optimize slow database queries through indexing?
database-design covers query optimization by teaching you to analyze execution plans, identify missing or inefficient indexes, and understand index trade-offs (speed vs. write cost). You'll learn when to index on single columns versus composite indexes, how to avoid common pitfalls like the N+1 query problem, and techniques for denormalization when normalization hurts performance. The skill applies to both SQL and document stores.
Should I use Prisma, TypeORM, or Drizzle for my project?
database-design helps you evaluate ORMs by comparing their schema design approaches, migration capabilities, query APIs, and type safety. Prisma excels at developer experience and type generation; TypeORM offers decorator-based patterns; Drizzle provides lightweight SQL-like syntax. The skill guides you through trade-offs in learning curve, performance, and flexibility so you can choose the right fit for your application's needs and team expertise.
What does database normalization mean and when should I break it?
database-design explains normalization as the process of organizing data to reduce redundancy through normal forms (1NF through 3NF). This prevents anomalies and keeps updates efficient. However, the skill also covers denormalization—intentionally breaking normalization rules by duplicating or combining data—when read performance is critical and update frequency is low. You'll learn to measure trade-offs and apply denormalization strategically, not by default.
How do I audit an existing database design for problems?
database-design provides a review framework covering relationship integrity, missing or redundant indexes, normalization violations, and constraint gaps. You'll learn to spot anti-patterns like missing foreign keys, implicit many-to-many relationships, and columns that should be separate tables. The skill helps you prioritize fixes by impact, plan safe refactoring, and document design decisions so future changes stay aligned with your data model.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
Database Design
Design efficient, maintainable database schemas with safe migration strategies.
Key Principles
- Start from requirements: identify entities, attributes, and relationships first
- Normalize for data integrity, denormalize selectively for read performance
- Design indexes based on actual query patterns, not guesses
- Migrations must be reversible and safe for zero-downtime deployments
- Choose the right ORM — Prisma for type safety, Drizzle for SQL-close, TypeORM for enterprise
Quick Start Checklist
- Identify entities and relationships from requirements
- Design normalized schema (3NF minimum)
- Add indexes for known query patterns
- Plan migration strategy (up + down)
- Choose ORM/query builder based on project needs
- Set up seed data for development
References
| Reference | Description |
|---|---|
(truncated - see the full file via the links below)
File tree — 9 files
plugins/pokayokay/skills/database-design/SKILL.md
plugins/pokayokay/skills/database-design/references/index-design.md
plugins/pokayokay/skills/database-design/references/migration-strategies.md
plugins/pokayokay/skills/database-design/references/postgresql.md
plugins/pokayokay/skills/database-design/references/prisma-patterns.md
plugins/pokayokay/skills/database-design/references/query-optimization.md
plugins/pokayokay/skills/database-design/references/review-checklist.md
plugins/pokayokay/skills/database-design/references/schema-patterns.md
plugins/pokayokay/skills/database-design/references/tdd-patterns.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Design normalized database schemas with proper relationships and integrity”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
Database Design teaches schema fundamentals, ORM selection, and performance tuning through structured decision-making rather than rote patterns. It covers normalization, relationship design, indexing strategy, and query optimization across PostgreSQL, SQLite, and serverless databases.
drizzle-orm-d1 equips you with a complete type-safe ORM layer for Cloudflare D1 databases, handling schema definition, migration generation via Drizzle Kit, and D1-specific patterns like batch operations instead of traditional transactions. It includes templates for common queries, relations, and prepared statements, plus an error catalog addressing D1-specific issues like binding errors and foreign key constraints.
DataModelLM is a visual editor for building database schemas in Prisma format, rendering them as entity-relationship diagrams on an interactive canvas. Define models, relationships, and constraints through a structured schema file, then view the resulting data structure graphically. Supports one-to-many, one-to-one, and many-to-many relationships with full Prisma type and attribute support.
Database Design guides you through schema normalization, indexing strategies, and query optimization for both SQL and NoSQL systems. It covers normalization forms, denormalization trade-offs, index types, and migration patterns to help you build performant, maintainable databases. Use it when designing tables, fixing performance issues, or planning data migrations.
specify-solution guides you through building solution design documents (SDDs) that capture how your system will be built. It structures your architecture decisions as traceable ADRs, validates that every requirement maps to a component, and ensures your design is complete and conflict-free before implementation begins.
oma-db guides you through relational, document, and vector data modeling with schema documentation, integrity rules, and transaction design. It covers normalization, indexing, capacity planning, backup strategy, and anti-pattern remediation, plus ISO 27001/27002-aligned recommendations for security and continuity.
More skills spatial (MIT) · Database Design (unlicensed) · database-schema-design (MIT) · Drizzle Orm (unlicensed) · database-fundamentals (MIT) · drizzle-orm-patterns (MIT)