What problem does it solve?
This Skill unit provides comprehensive guidance on database design principles, helping users make informed decisions about schema design, indexing, ORM selection, and serverless databases.
Core Features & Use Cases
- Database Selection: Offers a decision tree for choosing the right database (PostgreSQL, Neon, Turso, SQLite, PlanetScale, CockroachDB) based on specific requirements.
- ORM Selection: Provides a decision tree for selecting the optimal ORM (Drizzle, Prisma, Kysely, Raw SQL) based on deployment and development experience.
- Schema Design: Discusses normalization, primary keys, timestamps, and relationships, with guidelines for when to normalize or denormalize.
- Indexing: Explains when and how to create indexes effectively, including B-tree, Hash, GIN, GiST, and HNSW/IVFFlat index types.
- Query Optimization: Offers strategies for optimizing queries, including solving the N+1 problem and using EXPLAIN ANALYZE.
- Migrations: Provides a safe migration strategy for zero-downtime changes, including adding, removing, and renaming columns, and adding indexes.
Quick Start
Use the database-design skill to analyze your database design needs and receive expert recommendations.