database-design

Generate normalized schemas and zero-downtime migrations for PostgreSQL, MySQL, and NoSQL databases.

Updated Jul 8, 2022
One-click install
npx skills add https://github.com/limaon/dotfiles --skill database-design-limaon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-design
Source: https://github.com/limaon/dotfiles/tree/main/.config/opencode/skills/database-design
Command: npx skills add https://github.com/limaon/dotfiles --skill database-design-limaon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps engineers craft robust database schemas, optimize migrations, and choose effective indexing strategies to improve data integrity and performance across PostgreSQL, MySQL, and NoSQL stores.

Core Features & Use Cases

  • Schema Design: Normalize schemas (1NF-3NF), define relationships, and enforce data integrity.
  • Migration Patterns: Provide safe, zero-downtime migration templates and backfilling strategies.
  • Index & Performance: Recommend indexing patterns and query optimization techniques for common workloads.
  • Use Case: When scaling a multi-tenant app, use this skill to design schemas that support isolation, efficient joins, and smooth migrations with minimal downtime.

Quick Start

Use the database-design skill to generate a normalized schema for a sample users and addresses system and plan a safe migration path.

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 normalized database schema for a multi-tenant application?

To design a normalized database schema for a multi-tenant application, apply explicit 1NF-3NF normalization rules to define relationships and enforce data isolation. This ensures efficient joins and supports scalable transactional workloads.

What is a zero-downtime database migration and when do I need it?

A zero-downtime database migration is a safe schema update template that includes backfilling strategies to prevent service disruption. You need it when scaling software projects that require continuous availability during structural data changes.

How do I choose the best indexing patterns for scalable SQL queries?

To choose the best indexing patterns for scalable SQL queries, evaluate query optimization techniques against your specific workloads. Apply well-structured indexing and denormalization patterns to improve query performance across PostgreSQL and MySQL environments.

Can I use these schema design patterns for NoSQL stores?

Yes, you can apply these schema design patterns to NoSQL stores alongside PostgreSQL and MySQL. The approach provides well-structured indexing and denormalization patterns demonstrated with SQL examples to improve data integrity across multi-database environments.

When should I use denormalization instead of strict 1NF-3NF normalization?

You should use denormalization instead of strict 1NF-3NF normalization when optimizing analytic workloads that require faster read performance over strict data integrity. Apply denormalization patterns to complement normalized schemas for high-demand query use cases.