database-design
Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.
- License 许可
- Apache-2.0
- 最近更新
- 2026-06-23
- Stars
- ★ 6
- Forks
- 0
01 前言 Front Matter
- name
- database-design
- risk
- safe
- source
- community
- date_added
- 2026-02-27
- description
- Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.
02 资源文件 11
- 参考文档database-selection.md1.1 KB
- 参考文档indexing.md892 B
- 许可证LICENSE1.0 KB
- 参考文档migrations.md1.1 KB
- 参考文档optimization.md902 B
- 参考文档orm-selection.md771 B
- 参考文档repos/metamask-mobile.md2.9 KB
- 参考文档schema-design.md1.4 KB
- 脚本scripts/schema_validator.py5.2 KB
- 参考文档SOURCE.md372 B
- 参考文档TRUST.auto.yaml2.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
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
04 同仓库更多 Skills
test_skill
暂无简介
zustand-store-ts
Create Zustand stores following established patterns with proper TypeScript types and middleware.
zoom-automation
Automate Zoom meeting creation, management, recordings, webinars, and participant tracking via Rube MCP (Composio). Always search tools first for current schemas.
zoho-crm-automation
Automate Zoho CRM tasks via Rube MCP (Composio): create/update records, search contacts, manage leads, and convert leads. Always search tools first for current schemas.
zod-validation-expert
Expert in Zod — TypeScript-first schema validation. Covers parsing, custom errors, refinements, type inference, and integration with React Hook Form, Next.js, and tRPC.
zeroize-audit
Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C/C++/Rust code handling secrets, keys, passwords, or other sensitive data.