database-design

Guides database selection, schema design, indexing, and query optimization decisions.

1|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/mst-software-vn/mst-checkscam --skill database-design-mst-software-vn
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: database-design
Source: https://github.com/mst-software-vn/mst-checkscam/tree/main/.claude/skills/database-design
Command: npx skills add https://github.com/mst-software-vn/mst-checkscam --skill database-design-mst-software-vn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Choosing the wrong database, ORM, or schema structure early in a project leads to painful migrations, slow queries, and over-engineered systems. This Skill provides decision frameworks and reference material so you design schemas and pick tools based on actual context instead of defaults. ## Core Features & Use Cases - Database & ORM Selection: Decision trees comparing PostgreSQL, Neon, Turso, SQLite, PlanetScale, and ORMs like Drizzle, Prisma, and Kysely. - Schema & Indexing Guidance: Principles for normalization, primary keys, timestamps, relationships, composite indexes, and safe zero-downtime migrations. - Schema Validation Script: A Python script that scans Prisma schemas for missing IDs, timestamps, naming issues, and missing indexes. - Use Case: When starting a new serverless app, ask for a database recommendation and get a reasoned choice (e.g., Neon vs Turso) plus a schema with proper indexes and migration strategy. ## Quick Start Ask the assistant to help design a database schema for your application and recommend a database and ORM based on your deployment environment.

Frequently Asked Questions about database-design

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

FAQPage Schema
How do I choose between PostgreSQL, Neon, Turso, and SQLite?▼

Choose based on deployment context: PostgreSQL for full relational features, Neon for serverless PostgreSQL with branching, Turso for edge deployment with low latency, and SQLite for simple embedded or local apps. The decision tree in the reference files walks through these trade-offs.

Drizzle vs Prisma: which ORM should I use?▼

Drizzle fits edge deployments and small bundle sizes with SQL-like syntax, while Prisma offers better developer experience with schema-first migrations and tooling. Kysely is an option when you want a type-safe SQL query builder with maximum control.

How do I fix N+1 query problems?▼

Solve N+1 queries by using JOINs to fetch related data in one query, eager loading through your ORM, DataLoader for batching in GraphQL, or subqueries. First run EXPLAIN ANALYZE to confirm the query pattern before optimizing.

When should I add indexes to database columns?▼

Index columns used in WHERE clauses, JOIN conditions, ORDER BY, and foreign keys. Avoid over-indexing write-heavy tables, low-cardinality columns, and columns rarely queried, since indexes slow down inserts.

How do I run zero-downtime database migrations?▼

Make changes in multiple steps: add columns as nullable then backfill before adding NOT NULL, create indexes with CREATE INDEX CONCURRENTLY, and rename columns by adding the new one, migrating data, then dropping the old. Always test on a data copy first.