database-design

Guide database schema, indexing, and deployment design decisions.

Updated Aug 22, 2025
One-click install
npx skills add https://github.com/AnthonyCongHieu/voice_tool --skill database-design-anthonyconghieu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-design
Source: https://github.com/AnthonyCongHieu/voice_tool/tree/main/voice_tools_v1/.agent/skills/database-design
Command: npx skills add https://github.com/AnthonyCongHieu/voice_tool --skill database-design-anthonyconghieu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Designing robust, scalable databases is error-prone and time-consuming; this Skill provides principled guidance on schema design, indexing strategies, and ORM/serverless deployment decisions to reduce risk and speed onboarding.

Core Features & Use Cases

  • Principled Schema Design: covers normalization decisions, primary/foreign key strategies, timestamps, and relationship modeling to ensure data integrity across apps.
  • Indexing & Performance: offers guidance on indexing choices, composite indexes, and patterns to avoid N+1 queries in real workloads.
  • Deployment & ORM Guidance: compares serverless versus self-hosted deployments and suggests ORM selections aligned with project context.
  • Use Case: design a multi-tenant application with clear entity relationships and scalable migrations.

Quick Start

Outline your project’s data model, listing tables, primary keys, and index strategy to begin the design.

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 with proper normalization and foreign keys?

Database schema design requires principled normalization decisions, primary and foreign key strategies, and relationship modeling to ensure data integrity. You must outline your project's data model, listing tables and primary keys to establish clear entity relationships.

What's the best way to choose indexing strategies and avoid N+1 queries?

Indexing strategies require selecting appropriate composite indexes and query patterns to avoid N+1 queries in real workloads. You must evaluate indexing choices alongside your schema design to ensure query performance scales with your application.

How do I select an ORM and decide between serverless versus self-hosted databases?

ORM selection depends on comparing serverless versus self-hosted database deployments aligned with your project context. You must evaluate your deployment environment and migration strategy to determine the appropriate ORM and database architecture.

Can I use this database design approach for multi-tenant application architectures?

Database design for multi-tenant applications requires clear entity relationships, scalable migrations, and disciplined normalization. You can apply principled schema design and indexing strategies to build multi-tenant systems with robust data integrity.

What are the best practices for timestamps and primary keys in relational databases?

Timestamps and primary keys in relational databases require principled strategies to maintain consistency across applications. You must establish clear conventions for primary/foreign key design and timestamp handling during the initial schema modeling phase.

When should I consider migration strategies for moving to serverless databases?

Migration strategies for serverless databases require evaluating your current self-hosted deployment, ORM compatibility, and schema design constraints. You must assess relational versus serverless trade-offs and project context before executing scalable migrations.