database-design

Guide database selection, schema design, indexing, and ORM choices.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python-dotenv, sqlalchemy, psycopg2-binary, drizzle-orm, prisma, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps users make informed decisions about database selection, schema design, indexing strategies, and ORM choices, preventing common pitfalls and optimizing performance.

Core Features & Use Cases

  • Database Selection: Guides users through choosing the right database (PostgreSQL, Neon, Turso, SQLite, etc.) based on project requirements.
  • Schema Design: Provides principles for normalization, primary keys, relationships, and timestamps.
  • Indexing Strategy: Recommends when and how to create effective indexes for performance.
  • ORM Selection: Assists in picking the best ORM (Drizzle, Prisma, Kysely) for the project context.
  • Optimization & Migrations: Offers guidance on query optimization and safe migration practices.

Quick Start

Guide me through selecting the best database for a new serverless web application with real-time data 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 the right database for a new serverless application?

Schema design requires applying normalization principles, selecting appropriate primary keys, and defining relationships and timestamps. This structured approach prevents data anomalies. Following these database design rules ensures data integrity and efficient querying.

When should I create indexes for database performance optimization?

Create indexes when query performance degrades, focusing on effective indexing strategies for frequently accessed columns. Proper indexing significantly speeds up data retrieval. This approach optimizes database performance without adding unnecessary overhead.

What is the best way to perform zero-downtime database migrations?

The best way to perform zero-downtime database migrations involves following safe migration practices that prevent locking and data loss. This ensures continuous availability during schema updates. Careful migration planning avoids deployment bottlenecks and downtime.

Drizzle vs Prisma: which ORM should I use for my project?

Choosing between Drizzle and Prisma depends on your project context and required type safety. Drizzle offers SQL-like syntax, while Prisma provides a generated client. Assessing ORM choices prevents architectural mismatches and ensures maintainable database interactions.

How does EXPLAIN ANALYZE help with query optimization?

EXPLAIN ANALYZE helps with query optimization by detailing the execution plan and timing of SQL statements. Analyzing this output reveals bottlenecks like sequential scans. This technique guides indexing improvements and accelerates slow database queries.