database-design

Design and optimize relational and NoSQL database schemas with migration patterns.

Updated Dec 11, 2025
One-click install
npx skills add https://github.com/Fancu1/dotfile --skill database-design-fancu1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-design
Source: https://github.com/Fancu1/dotfile/tree/main/skills/database-design
Command: npx skills add https://github.com/Fancu1/dotfile --skill database-design-fancu1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the complexities of designing efficient database schemas, optimizing query performance, and managing database migrations across various SQL and NoSQL platforms.

Core Features & Use Cases

  • Schema Design: Provides guidelines for normalization, denormalization, and constraint implementation.
  • Index Optimization: Offers strategies for creating effective indexes (B-tree, composite, partial, GIN) and analyzing index performance.
  • Migration Management: Outlines patterns for safe, zero-downtime database migrations.
  • Query Tuning: Explains how to use EXPLAIN ANALYZE and common optimization techniques.
  • Use Case: A developer needs to design a new relational schema for a user management system, ensuring data integrity and efficient querying.

Quick Start

Use the database-design skill to generate a PostgreSQL schema for a blog with users, posts, and comments tables.

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 PostgreSQL schema for a user management system?

Design a PostgreSQL schema by applying normalization, denormalization, and constraint implementation guidelines to ensure data integrity and efficient querying for relational tables.

What is the best way to create effective indexes in PostgreSQL?

The best way to create effective indexes in PostgreSQL is to analyze index performance and apply strategies for B-tree, composite, partial, and GIN indexes tailored to your query patterns.

How do I perform zero-downtime database migrations?

Perform zero-downtime database migrations by following safe migration patterns that outline structural changes without locking tables or disrupting active relational and NoSQL database operations.

How does EXPLAIN ANALYZE help with SQL query optimization?

EXPLAIN ANALYZE helps with SQL query optimization by executing the query to reveal actual runtime statistics, enabling you to identify bottlenecks and apply common tuning techniques for relational databases.

Does this database design approach work for NoSQL databases?

Yes, this database design approach works for NoSQL databases by providing data modeling and maintenance guidance specifically adapted for both SQL and NoSQL platforms to facilitate efficient schemas.

When should I use denormalization over normalization in schema design?

Use denormalization over normalization in schema design when you need to optimize read performance by reducing complex joins, whereas normalization ensures data integrity and reduces redundancy in relational databases.