database-design

Design database schemas and safe migration patterns for PostgreSQL, MySQL, and NoSQL.

60|13|Updated Dec 22, 2025
One-click install
npx skills add https://github.com/plurigrid/asi --skill database-design-plurigrid
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-design
Source: https://github.com/plurigrid/asi/tree/main/skills/database-design
Command: npx skills add https://github.com/plurigrid/asi --skill database-design-plurigrid

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides practical guidance on database design, normalization, indexing, and zero-downtime migrations to improve data integrity and query performance.

Core Features & Use Cases

  • Schema design principles: Normalization, denormalization, and index strategies
  • Migration patterns: Safe, zero-downtime migration templates
  • Query optimization: Explain plans and performance improvements

Quick Start

Review the sample schemas and migration templates, then apply a safe migration pattern to your own database.

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 that won't cause performance issues as my data grows?

Database schema design balances normalization for data integrity with denormalization for query speed. Start by identifying entities and relationships, apply normalization standards (1NF–3NF), then selectively denormalize and add indexes based on query patterns. This approach prevents common bottlenecks like N+1 queries and full table scans.

What's the safest way to migrate a database schema without downtime?

Zero-downtime migrations use non-blocking schema changes that keep the database available during transitions. Deploy changes in phases: add new columns or indexes first, update application code, then remove old schema. This pattern works across PostgreSQL, MySQL, and NoSQL databases to maintain service availability.

How do I know if my database indexes are actually helping performance?

Use database explain plans to analyze query execution. Review which indexes the query optimizer chooses and check actual row counts scanned versus returned. This reveals whether indexes accelerate queries or whether schema denormalization, query restructuring, or additional indexes are needed.

Can I apply database normalization to NoSQL databases?

NoSQL databases use schema design differently than relational systems. Normalization principles (eliminating redundancy, maintaining data integrity) still apply, but implementation differs: embed related data in documents or use references based on access patterns rather than rigid relational rules.

When should I denormalize instead of keeping my database fully normalized?

Denormalize when normalized schemas create slow queries despite optimization, when you read data far more than you write it, or when query complexity becomes unmanageable. Denormalization trades write complexity and storage for faster reads; use explain plans to justify the tradeoff.

How do I test database migrations before deploying them to production?

Create testable migration templates that run against staging databases matching production schema and scale. Test both forward and rollback paths, verify data integrity after migration, and measure performance impact. This catches issues before they affect live systems.