database-design

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

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/ntdev204/rai_ws --skill database-design-ntdev204
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-design
Source: https://github.com/ntdev204/rai_ws/tree/main/.agent/skills/database-design
Command: npx skills add https://github.com/ntdev204/rai_ws --skill database-design-ntdev204

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps you make informed decisions about database and ORM selection, schema design, indexing, and optimization, ensuring efficient and scalable data management.

Core Features & Use Cases

  • Database Selection: Guides you through choosing the right database (PostgreSQL, Neon, Turso, SQLite, etc.) based on project requirements.
  • ORM Selection: Assists in picking the best ORM (Drizzle, Prisma, Kysely) for your development needs.
  • Schema Design: Provides principles for normalization, primary keys, timestamps, and relationships.
  • Indexing & Optimization: Offers strategies for effective indexing and query optimization (N+1 problem, EXPLAIN ANALYZE).
  • Migrations: Outlines safe migration strategies for zero-downtime changes.
  • Use Case: When starting a new project, use this Skill to compare PostgreSQL and Turso, select Prisma as your ORM, and design a normalized schema with appropriate indexes.

Quick Start

Use the database-design skill to help choose between Drizzle and Prisma for a new 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, Turso, and SQLite for my database schema?

Database selection depends on your project requirements: PostgreSQL for robust relational data, Turso for edge computing, and SQLite for embedded solutions. The skill evaluates your scaling needs and architecture to recommend the optimal database system.

What is the best way to design database indexes for query optimization?

Database indexing strategies involve analyzing query patterns and using EXPLAIN ANALYZE to identify bottlenecks. This skill provides principles for creating effective indexes that resolve performance issues like the N+1 problem.

How do I select the right ORM like Drizzle or Prisma for my project?

ORM selection requires matching framework capabilities with your development needs. This skill compares options like Drizzle, Prisma, and Kysely, helping you pick the best tool for schema design and database interactions.

How do I perform zero-downtime database migrations safely?

Safe database migrations require structured strategies to apply schema changes without service interruption. This skill outlines specific practices for zero-downtime transitions, covering normalization, primary keys, and relationship modifications.

What are the core principles of relational database schema design and normalization?

Relational database schema design relies on proper normalization, primary keys, timestamps, and relationship structuring. This skill provides actionable principles to ensure your schema supports efficient and scalable data management.