database-design

Guide relational database and schema design with normalization, indexing, and migration planning.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps you design reliable, high-performance database schemas and make better database and ORM choices instead of copying SQL patterns that don’t fit your context.

Core Features & Use Cases

  • Database selection guidance: Pick the right database engine (e.g., PostgreSQL vs Neon vs Turso vs SQLite) based on deployment, query complexity, vector needs, and distribution requirements.
  • Schema design principles: Apply normalization, choose appropriate primary keys and timestamps, and model relationships with correct foreign key behaviors (CASCADE/SET NULL/RESTRICT).
  • Performance and safety playbooks: Define indexing strategies, avoid common query pitfalls like N+1, and plan safe migrations for zero-downtime changes (especially on serverless databases).

Use Case Example: You’re building a Next.js app with a growing dataset and uncertain query patterns; use this Skill to select a suitable database/ORM, design tables with proper relationships and timestamps, add the right indexes for WHERE/JOIN/ORDER BY, and plan migrations that won’t break production.

Quick Start

Ask: “Design my database schema for this app using the database-design Skill: target database context is serverless, tables will grow to around 50k rows, and I need pagination and fast search; propose the entities, key strategy, timestamp strategy, relationships, indexes, and a safe migration plan.”

Frequently Asked Questions about database-design

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

FAQPage Schema
How do I design a database schema for a serverless PostgreSQL environment?

To design a database schema for serverless PostgreSQL, you select appropriate primary keys, model relationships with correct foreign key behaviors like CASCADE or SET NULL, and plan zero-downtime migrations to ensure performant relational models.

What's the best way to choose indexes for query optimization?

Choosing indexes for query optimization involves defining indexing strategies that target WHERE, JOIN, and ORDER BY clauses while avoiding common query pitfalls like N+1 problems to maintain high performance as your dataset grows.

How do I plan safe database migrations with zero downtime?

Planning safe database migrations with zero downtime requires applying specific migration patterns designed for serverless databases, ensuring that structural changes do not break production environments during deployment.

How do I select the right database engine for my application requirements?

Selecting the right database engine involves evaluating PostgreSQL, Neon, Turso, or SQLite based on your deployment context, query complexity, vector needs, and distribution requirements to ensure reliable performance.

When do I need schema normalization and proper relationship modeling?

You need schema normalization and proper relationship modeling when building maintainable relational models, applying principles to choose appropriate timestamps and foreign key behaviors for growing datasets.

How can I avoid N+1 query problems in my ORM?

Avoiding N+1 query problems in your ORM requires applying query planning techniques that optimize data fetching, ensuring your schema design and indexing strategies support efficient relationship loading.