database-schema-design
/database-schema-design
Design relational or document schemas from access patterns, cardinality, and lifecycle. Use when modeling entities, choosing embed vs normalize, or shaping schema boundaries before implementation.
- Author
- HoangNguyen0403 ↗
- Repository
- agent-skills-standard ↗
- Licence
- MIT
- Last repository change
- 22.10.2026
Assessment and security
- Files in this package
- 3
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 22.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Design relational or document schemas from access patterns, cardinality, and lifecycle. Use when modeling entities, choosing embed vs normalize, or shaping schema boundaries before implementation.
Original author description
Design relational or document schemas from access patterns, cardinality, and lifecycle. Use when modeling entities, choosing embed vs normalize, or shaping schema boundaries before implementation.
How it works
- Priority: P0 (CRITICAL)
- Rules
- Verify
- Anti-Patterns
- References
SKILL.md preview
---
name: database-schema-design
description: Design relational or document schemas from access patterns, cardinality, and lifecycle. Use when modeling entities, choosing embed vs normalize, or shaping schema boundaries before implementation.
metadata:
triggers:
files:
- '**/*.entity.ts'
- 'prisma/schema.prisma'
- '**/*.json'
keywords:
- schema
- data model
- cardinality
- embed
- normalize
---
# Database Schema Design
## **Priority: P0 (CRITICAL)**
Start from reads, writes, and ownership. Schema follows access patterns, not vice versa.
## Rules
- Model one business concept per table/collection boundary.
- Choose embed vs reference or normalize vs denormalize from cardinality, update frequency, and read locality.
- Encode uniqueness, nullability, and foreign-key or ownership rules explicitly.
- Prefer additive evolution over destructive redesigns.
## Verify
- [ ] Hot reads are supported without avoidable joins or fan-out.
- [ ] Cardinality and lifecycle were written down for major relationships.
- [ ] Constraints or validation rules exist for business invariants.
- [ ] IDs, timestamps, and soft-delete semantics are consistent.
## Anti-Patterns
- **No schema from ORM defaults**: model business access patterns first.
- **No many-to-many without owner rules**: define source of truth and cleanup behavior.
- **No nullable drift**: nullable fields need lifecycle meaning.
## References
- [Framework Map](../references/framework-map.md)
- [Normalization Tradeoffs](references/normalization-tradeoffs.md)
Files in this package (3)
- SKILL.md 2 KB
- evals/evals.json 1 KB
- references/normalization-tradeoffs.md 2 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · HoangNguyen0403/agent-skills-standard | 90 | MIT |
| akillness/jeo-skills | 100 | MIT |
| reddygopalkrishna/developer-agent-skills | 100 | MIT |
| timwukp/agent-skills-best-practice | 100 | MIT |
| seb1n/awesome-ai-agent-skills | 100 | MIT |
Database snapshot: 13.11.2026 · package version 01705d0efcf8 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100database-engineering
Use when designing database schemas, modeling relational or document entities, writing or optimizing SQL queries, planning zero-downtime database migrations, adding composite indexes, or debugging connection pooling. - 90database-design
Designs or reviews relational, document, key-value, graph, or search data models with ownership, invariants, access paths, migrations, consistency, retention, privacy, and recovery behavior. Use for schema changes, new data stores, indexes, migrations, persistence boundaries, or… - 90database-mongodb
Apply MongoDB data-modeling, indexing, and query rules from access patterns. Use when designing schemas, choosing embed vs reference, or tuning MongoDB query behavior. - 100database-schema-designer
Designs relational and document database schemas from requirements or an existing app - tables and collections, keys, relationships, constraints, indexes driven by real query patterns, ERDs, and reversible migration scripts - with PostgreSQL (including Supabase) as the default… - 100database-schema-designer
Use when the user asks to create ERD diagrams, normalize database schemas, design table relationships, or plan schema migrations. - 100database-design
Relational database design patterns - normalization, keys, relationships, constraints, naming, timestamps, soft deletes, migration strategy, and security/retention. Use when designing or reviewing a schema.