skillfed

database-design

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.

Database Design helps you build normalized schemas by guiding ORM choice, indexing strategy, and query patterns for your specific context.

AI-generated summary based on this skill's SKILL.md

8,011 1,512 MIT updated by vudovn

Install

vudovn/ag-kit/database-design · repository language: TypeScript

git clone https://github.com/vudovn/ag-kit
cp -r ag-kit/.agents/skills/database-design ~/.claude/skills/database-design
npx skillfed install vudovn/ag-kit/database-design

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I design a database schema for my application?

Database Design covers schema fundamentals through structured decision-making. Start by identifying entities and their relationships, then apply normalization principles to eliminate redundancy. The skill guides you through designing relational schemas that balance query efficiency with data integrity, considering your specific application context and scale requirements.

What are database design best practices I should follow?

Database Design emphasizes normalization, proper relationship modeling, and thoughtful indexing. Key practices include: decomposing data to eliminate redundancy, choosing appropriate primary and foreign keys, designing for query patterns rather than just data structure, and planning migrations safely from the start. The skill teaches decision-making frameworks rather than rigid patterns.

How do I choose between PostgreSQL and SQLite?

Database Design helps you evaluate databases by context. PostgreSQL suits multi-user applications, complex queries, and production systems needing reliability. SQLite works well for embedded use, prototyping, and edge deployments. The skill also covers serverless options like Neon and Turso, helping you match database choice to your project's scale, concurrency needs, and infrastructure constraints.

What's the difference between Prisma and Drizzle ORM?

Database Design covers ORM selection as part of choosing the right tools for your project. Both ORMs handle schema definition and query building, but differ in philosophy and features. The skill teaches you to evaluate ORMs based on your application's needs, migration strategy, type safety requirements, and performance characteristics rather than recommending one universally.

How do I optimize database queries and avoid N+1 problems?

Database Design addresses query optimization through indexing strategy and relationship design. N+1 issues arise when fetching related data inefficiently. The skill teaches you to recognize these patterns, use eager loading and batch queries, design indexes for common access patterns, and analyze query performance with tools like EXPLAIN ANALYZE to identify bottlenecks.

How should I plan and execute safe database migrations?

Database Design emphasizes migration safety as a core design principle. Plan migrations by understanding your schema changes, testing in staging environments, and using reversible migration tools. The skill covers strategies for zero-downtime deployments, handling data transformations safely, and coordinating schema changes with application code to prevent production incidents.

SKILL.md

rendered from the published skill — quoted content, verbatim

Database Design

> Learn to THINK, not copy SQL patterns.

🎯 Selective Reading Rule

Read ONLY files relevant to the request! Check the content map, find what you need.

File Description When to Read
database-selection.md PostgreSQL vs Neon vs Turso vs SQLite Choosing database
orm-selection.md Drizzle vs Prisma vs Kysely Choosing ORM
schema-design.md Normalization, PKs, relationships Designing schema
indexing.md Index types, composite indexes Performance tuning
optimization.md N+1, EXPLAIN ANALYZE Query optimization
migrations.md Safe migrations, serverless DBs Schema changes

⚠️ Core Principle

  • ASK user for database preferences when unclear
  • Choose database/ORM based on CONTEXT

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 8 files
.agents/skills/database-design/SKILL.md
.agents/skills/database-design/database-selection.md
.agents/skills/database-design/indexing.md
.agents/skills/database-design/migrations.md
.agents/skills/database-design/optimization.md
.agents/skills/database-design/orm-selection.md
.agents/skills/database-design/schema-design.md
.agents/skills/database-design/scripts/schema_validator.py

Related skills

Tags

schema-architecture orm-comparison query-performance data-modeling database-selection migration-strategy indexing-tactics normalization-rules serverless-databases