database-design

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

2|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/Tai-ch0802/skills-bundle --skill database-design-tai-ch0802
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-design
Source: https://github.com/Tai-ch0802/skills-bundle/tree/main/i18n/zh-TW/database-design
Command: npx skills add https://github.com/Tai-ch0802/skills-bundle --skill database-design-tai-ch0802

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps you make informed decisions about database selection, schema design, indexing, and optimization, preventing common pitfalls and ensuring your data infrastructure is performant and scalable.

Core Features & Use Cases

  • Database Selection: Guides you through choosing the right database (e.g., PostgreSQL, Neon, Turso, SQLite) based on your project's needs.
  • Schema Design: Provides principles for normalization, primary key selection, and defining relationships.
  • Indexing Strategies: Recommends when and how to use indexes for optimal query performance.
  • Optimization Techniques: Addresses common issues like the N+1 problem and how to analyze query performance.
  • Migrations: Outlines safe strategies for database schema changes.

Quick Start

Guide me through selecting the best database for a new web application with edge deployment needs.

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, Turso, and SQLite for my web application?

Database selection depends on your project's deployment needs, such as edge computing requirements. This guidance compares PostgreSQL, Neon, Turso, and SQLite to help you evaluate their specific strengths for scalable data infrastructure.

How do I fix the N+1 query problem and optimize slow SQL queries?

Resolving the N+1 query problem requires analyzing query execution plans using `EXPLAIN ANALYZE`. This optimization technique identifies inefficient joins or missing indexes, allowing you to restructure queries for better performance.

When should I add indexing strategies to improve database performance?

Indexing strategies should be implemented when specific columns are frequently used in query filters or joins. Proper database indexing accelerates data retrieval and reduces table scan overhead during complex operations.

How do I perform safe database migrations with zero downtime?

Safe database migrations involve applying schema changes incrementally to prevent service disruption. Following zero-downtime strategies ensures backward compatibility and maintains data integrity during structural updates.