database-design

Guide database schema design, system selection, and indexing optimization.

2|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/bcastelino/agent-skills-kit --skill database-design-bcastelino
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-design
Source: https://github.com/bcastelino/agent-skills-kit/tree/main/skills/database-design
Command: npx skills add https://github.com/bcastelino/agent-skills-kit --skill database-design-bcastelino

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the complexities of designing, selecting, and optimizing database schemas and related technologies, ensuring efficient data management and application performance.

Core Features & Use Cases

  • Database & ORM Selection: Guides users in choosing the right database (PostgreSQL, Neon, Turso, SQLite) and ORM (Drizzle, Prisma, Kysely) based on project requirements.
  • Schema Design: Provides principles for normalization, primary key selection, timestamp strategies, and relationship modeling.
  • Performance Optimization: Offers guidance on indexing strategies, query analysis (N+1 problem, EXPLAIN ANALYZE), and migration best practices.
  • Use Case: When starting a new web application, use this Skill to decide between PostgreSQL and Neon, select Prisma as the ORM, and design the initial user and product tables with appropriate indexes.

Quick Start

Use the database-design skill to help select an appropriate ORM for a new TypeScript project.

Frequently Asked Questions about database-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose between PostgreSQL, Neon, and Turso for database schema design?

Database design selection depends on project scale: PostgreSQL offers robust relational features, while serverless options like Neon and Turso provide scalable edge deployment. This decision framework evaluates your requirements to recommend the optimal system.

What is the best way to select an ORM like Prisma, Drizzle, or Kysely for a new project?

Selecting an ORM involves matching query styles to your architecture: Prisma provides schema-first abstraction, Drizzle offers SQL-like control, and Kysely focuses on type-safe query building. This guidance maps your project needs to the right ORM.

How do I fix the N+1 query problem and optimize database indexing?

Optimizing database indexing and resolving the N+1 query problem requires analyzing execution plans using EXPLAIN ANALYZE. This guidance provides indexing strategies and query analysis techniques to eliminate inefficient data fetching patterns.

What are common database anti-patterns to avoid during migrations?

Common database anti-patterns to avoid during migrations include poor primary key selection, improper timestamp strategies, and unnormalized relationships. This resource identifies these issues and offers migration best practices for efficient data architecture.

Does this database design guidance cover normalization and relationship modeling?

Yes, this database design guidance covers normalization, primary key selection, timestamp strategies, and relationship modeling. These schema design principles ensure efficient data management and robust application performance.

When should I use serverless databases like Neon or Turso instead of traditional PostgreSQL?

Use serverless databases like Neon or Turso instead of traditional PostgreSQL when you need automated scaling, pay-per-use pricing, and edge deployment capabilities. This decision framework evaluates your scale and context to recommend the right approach.