database-design

Guide database design decisions for schema, indexing, ORM, and migrations.

1|Updated Jun 17, 2026
One-click install
npx skills add https://github.com/NabilThange/ohm-band --skill database-design-nabilthange
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-design
Source: https://github.com/NabilThange/ohm-band/tree/main/.agent/skills/database-design
Command: npx skills add https://github.com/NabilThange/ohm-band --skill database-design-nabilthange

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill unit provides comprehensive guidance on database design principles, helping users make informed decisions about schema design, indexing, ORM selection, and serverless databases.

Core Features & Use Cases

  • Database Selection: Offers a decision tree for choosing the right database (PostgreSQL, Neon, Turso, SQLite, PlanetScale, CockroachDB) based on specific requirements.
  • ORM Selection: Provides a decision tree for selecting the optimal ORM (Drizzle, Prisma, Kysely, Raw SQL) based on deployment and development experience.
  • Schema Design: Discusses normalization, primary keys, timestamps, and relationships, with guidelines for when to normalize or denormalize.
  • Indexing: Explains when and how to create indexes effectively, including B-tree, Hash, GIN, GiST, and HNSW/IVFFlat index types.
  • Query Optimization: Offers strategies for optimizing queries, including solving the N+1 problem and using EXPLAIN ANALYZE.
  • Migrations: Provides a safe migration strategy for zero-downtime changes, including adding, removing, and renaming columns, and adding indexes.

Quick Start

Use the database-design skill to analyze your database design needs and receive expert recommendations.

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, SQLite, and serverless databases for my schema design?

Choosing a database involves using a decision tree that evaluates PostgreSQL, Neon, Turso, SQLite, PlanetScale, and CockroachDB against your specific deployment requirements and scalability needs.

What is the best way to select an ORM like Prisma or Drizzle for my database?

Selecting an ORM requires using a decision tree to evaluate Drizzle, Prisma, Kysely, or Raw SQL based on your specific deployment environment and development experience.

When should I normalize or denormalize my database schema?

Schema normalization should be used to reduce data redundancy, while denormalization is applied when query performance requires optimizing relationships and avoiding complex joins.

How do I optimize database queries and solve the N+1 problem?

Query optimization involves analyzing execution plans using EXPLAIN ANALYZE and applying specific strategies to solve the N+1 problem, reducing redundant database fetches.

What indexing strategies should I use for B-tree, Hash, or GIN indexes?

Indexing strategies dictate using B-tree, Hash, GIN, GiST, or HNSW/IVFFlat index types based on your specific data structure and query patterns to ensure efficient data retrieval.

How do I execute zero-downtime database migrations safely?

Zero-downtime migrations require following safe strategies for adding, removing, and renaming columns, as well as adding indexes, ensuring no service interruption during schema changes.