database-design

Design scalable databases with schema normalization, indexing strategies, and ORM choices for evolving models.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill guides teams through database design decisions to balance normalization, performance, and maintainability, helping avoid over- or under-optimized schemas.

Core Features & Use Cases

  • Schema design best practices: normalization, primary keys, timestamps, and relationships to ensure data integrity and scalable growth.
  • Indexing strategy: guidance on when to index and what types to use for common query patterns, reducing read latencies.
  • ORM and deployment choices: recommendations for Prisma, Drizzle, and raw SQL strategies depending on project size and DX.
  • Use Case: designing a multi-tenant application's data model with clear foreign-key relationships and an appropriate soft-delete policy.

Quick Start

Review a sample Prisma schema and produce a normalization plan, indexing strategy, and ORM recommendation for a multi-tenant app.

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

Design scalable database schemas by selecting appropriate normalization strategies, defining clear foreign-key relationships, and establishing a soft-delete policy to ensure data integrity across tenants. This approach balances performance and maintainability for evolving multi-tenant data models.

What is the best way to choose an indexing strategy for common query patterns?

Choose an indexing strategy by analyzing your common query patterns to determine when to index and what types to use. Applying the correct indexing plan reduces read latencies and prevents over- or under-optimized schemas in high-traffic applications.

When should I use normalization in my database design?

Use normalization in database design when data integrity and scalable growth are critical. Applying normalization strategies alongside primary keys and timestamps structures your data to handle evolving data models without sacrificing maintainability.

How do I choose between Prisma, Drizzle, and raw SQL for my project?

Choose between Prisma, Drizzle, and raw SQL by evaluating your project size and developer experience requirements. Aligning your ORM and DB engine choices with project scale ensures an optimal balance between deployment performance and development speed.

Does this database design approach work for systems with evolving data models?

Yes, this database design approach specifically targets systems with evolving data models. It guides teams through schema normalization and indexing plans that maintain performance and data integrity as multi-tenant application requirements grow.