database-patterns

Apply database design patterns to schema design, query optimization, and ORM integration.

5|1|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/Wania-Kazmi/claude-code-autonomous-agent-workflow --skill database-patterns-wania-kazmi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-patterns
Source: https://github.com/Wania-Kazmi/claude-code-autonomous-agent-workflow/tree/main/.claude/skills/database-patterns
Command: npx skills add https://github.com/Wania-Kazmi/claude-code-autonomous-agent-workflow --skill database-patterns-wania-kazmi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides guidance on robust database design, normalization, and ORM integration to improve data quality, maintainability, and performance across applications.

Core Features & Use Cases

  • Normalization & Schema Design: Advice on 3NF/BCNF, table layouts, indexing, and best practices for scalable schemas.
  • ORM & Migration Patterns: Recommendations for Prisma, Drizzle, and migration strategies to keep schemas in sync with code.
  • Use Case: When designing a multi-tenant system, apply patterns to isolate tenant data and enable scalable migrations.

Quick Start

Review your current schema and apply the recommended patterns to normalize the users table and add appropriate indexes.

Frequently Asked Questions about database-patterns

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

FAQPage Schema
How do I design a scalable database schema for a multi-tenant system?

Database design for a multi-tenant system involves applying normalization and proven patterns to isolate tenant data. You structure tables using 3NF/BCNF layouts and add appropriate indexes to maintain performance and data quality as the application scales.

What's the best way to manage database migrations with Prisma or Drizzle?

Database migrations with Prisma or Drizzle are managed by applying migration patterns that keep schemas in sync with code. This ensures structural changes are versioned and deployed smoothly without disrupting existing data integrity.

When do I need database normalization and indexing strategies?

Database normalization and indexing strategies are needed when designing schemas to improve data quality and maintainability. Applying 3NF/BCNF rules and targeted indexes ensures your database performs efficiently as data volume grows.

How does ORM integration work with PostgreSQL schema design?

ORM integration with PostgreSQL schema design connects your application code to the database structure using tools like Prisma or Drizzle. It applies ORM practices to map data models directly to normalized tables and manage query optimization.

Does this database design approach require knowledge of SQL patterns?

Yes, this database design approach requires knowledge of SQL patterns, normalization, indexing strategies, and migration workflows. Understanding these concepts is necessary to effectively apply proven patterns across PostgreSQL and modern ORMs.

How do I apply normalization to an existing users table?

To apply normalization to an existing users table, review your current schema and apply recommended patterns to achieve 3NF/BCNF compliance. You then add appropriate indexes to ensure query performance is maintained after restructuring.