| schemaVersion | "2026-04-11T00:00:00.000Z" |
| skillId | backend/database-schema-design |
| name | database-schema-design |
| displayName | Database Schema Design |
| description | Use when working on relational or document database schema design, indexing, constraints, and migration planning. Focus on data integrity, query shape, indexing, and future-safe migrations. |
| aliases | ["database-schema-design","Database Schema Design","databaseschemadesign","数据库设计","表结构设计","索引设计","迁移方案","数据表","表结构","schema","数据建模","索引","database","服务端","server side","数据建模方案"] |
| version | 0.1.0 |
| sourceHash | sha256:cb16b150022a8f25e60f40739808e7846614ebbc892ba9bc9ada317c0e1489ee |
| domain | backend |
| departmentTags | ["backend-platform"] |
| sceneTags | ["architecture"] |
Database Schema Design
Use this skill when the task involves relational or document database schema design, indexing, constraints, and migration planning.
Goal: produce reliable engineering guidance and implementation steps focused on data integrity, query shape, indexing, and future-safe migrations.
Working model
- Identify the affected system, data, users, and failure modes.
- Define invariants, inputs, outputs, ownership, and rollback needs.
- Prefer small, auditable changes with explicit validation.
- Call out security, performance, concurrency, and data-loss risks when relevant.
- Finish with concrete verification steps and residual risks.
Rules
- Ground recommendations in the current codebase or runtime evidence.
- Prefer explicit contracts, typed boundaries, and defensive validation.
- Do not hide operational concerns behind generic best practices.
- Include negative cases, edge cases, and failure behavior.
- For review tasks, list findings first with file and line references when possible.
- For test or performance tasks, define the workload, success criteria, and measurement method.
Checklist
- Are assumptions and ownership boundaries explicit?
- Are risky changes reversible or safely deployable?
- Are observability and diagnostics sufficient for production issues?
- Are tests or validation steps targeted to the actual risk?
- Are security and data-integrity concerns addressed?