database-design
Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.
- License 许可
- MIT
- 最近更新
- 2026-04-10
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- database-design
- description
- Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.
- 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.md771 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
WebApp Architect
Plan, build, refactor, debug, and prepare web applications end-to-end. Activate for greenfield builds, feature additions, architecture reviews, and deployment prep.
SEO Growth Auditor
Perform technical and on-page SEO audits, generate schema markup, and produce prioritized action reports. Activate for site launches, ranking improvements, and metadata fixes.
GDPR Compliance Copilot
Identify GDPR compliance gaps, map data flows, generate DSAR templates, and prepare privacy policy inputs. Always requires human legal review.
webapp-architect
暂无简介
seo-auditor
暂无简介
gdpr-copilot
暂无简介