database-design
Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.
- License 许可
- AGPL-3.0
- 所属仓库
- haliltek/dev.tr
- 最近更新
- 2026-11-13
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- database-design
- version
- 1.0.0
- description
- Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.
- when_to_use
- When designing database schemas, choosing ORMs, planning migrations, or optimizing queries. When working with Prisma, Drizzle, or SQL files.
- allowed-tools
- Read, Write, Edit, Glob, Grep
02 资源文件 7
- 参考文档database-selection.md1.1 KB
- 参考文档indexing.md892 B
- 参考文档migrations.md1.1 KB
- 参考文档optimization.md902 B
- 参考文档orm-selection.md764 B
- 参考文档schema-design.md1.4 KB
- 脚本scripts/schema_validator.py5.2 KB
03 SKILL.md 正文
Database Design
Learn to THINK, not copy SQL patterns.
🎯 Selective Reading Rule
Read ONLY files relevant to the request! Check the content map, find what you need.
| File | Description | When to Read |
|---|---|---|
database-selection.md |
PostgreSQL vs Neon vs Turso vs SQLite | Choosing database |
orm-selection.md |
Drizzle vs Prisma vs Kysely | Choosing ORM |
schema-design.md |
Normalization, PKs, relationships | Designing schema |
indexing.md |
Index types, composite indexes | Performance tuning |
optimization.md |
N+1, EXPLAIN ANALYZE | Query optimization |
migrations.md |
Safe migrations, serverless DBs | Schema changes |
⚠️ Core Principle
- ASK user for database preferences when unclear
- Choose database/ORM based on CONTEXT
- Don't default to PostgreSQL for everything
Decision Checklist
Before designing schema:
- [ ] Asked user about database preference?
- [ ] Chosen database for THIS context?
- [ ] Considered deployment environment?
- [ ] Planned index strategy?
- [ ] Defined relationship types?
Anti-Patterns
❌ Default to PostgreSQL for simple apps (SQLite may suffice) ❌ Skip indexing ❌ Use SELECT * in production ❌ Store JSON when structured data is better ❌ Ignore N+1 queries
04 同仓库更多 Skills
respectfully
Wraps any prompt with a reminder to respect CLAUDE.md files
recruiter
Think like a skeptical technical recruiter when working on the daily.dev Recruiter platform. Use when reviewing UI/UX, features, or code in webapp/pages/recruiter.
changelog
Generate a daily.dev changelog post for a new feature or update. Use when a team member needs to write a changelog announcement.
webapp-testing
Web application testing principles. E2E, Playwright, deep audit strategies.
web-design-guidelines
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
vulnerability-scanner
Advanced vulnerability analysis principles. OWASP 2025, Supply Chain Security, attack surface mapping, risk prioritization.