document-data-modeling

Design MongoDB document data models using aggregate-boundary analysis and schema versioning.

1|Updated Jun 20, 2026
One-click install
npx skills add https://github.com/shafibabar/SDLC-Artifact-Factory --skill document-data-modeling
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: document-data-modeling
Source: https://github.com/shafibabar/SDLC-Artifact-Factory/tree/main/skills/document-data-modeling
Command: npx skills add https://github.com/shafibabar/SDLC-Artifact-Factory --skill document-data-modeling

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill resolves the ambiguity in choosing between relational and document-oriented storage, preventing common architectural pitfalls like unbounded document growth, silent schema drift, and inefficient query patterns.

Core Features & Use Cases

  • Decision Framework: Provides a clear signal table to justify MongoDB usage over PostgreSQL based on aggregate-oriented data shapes.
  • Modeling Patterns: Offers expert guidance on the embed-vs-reference decision, denormalization tradeoffs, and schema versioning strategies.
  • Performance Optimization: Includes a comprehensive index taxonomy and the ESR rule to ensure hot queries are always covered and performant.

Quick Start

Use the document-data-modeling skill to evaluate if your current bounded context should transition from a relational table to an aggregate-oriented document model.

Frequently Asked Questions about document-data-modeling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
When should I choose MongoDB data modeling over a relational database schema?▼

Choose MongoDB data modeling over relational schemas when your bounded context has aggregate-oriented data shapes. Evaluate your data requirements to determine if document boundaries and read-locality justify the transition from PostgreSQL.

How do I decide between embedding vs referencing in MongoDB schema design?▼

Decide between embedding and referencing in MongoDB schema design by analyzing aggregate boundaries and cardinality requirements. Choose embedding for high read-locality and referencing to prevent unbounded document growth.

What is the ESR rule for MongoDB index strategies?▼

The ESR rule for MongoDB index strategies dictates index field ordering to ensure hot queries are covered and performant. Apply this taxonomy to optimize high-performance query patterns and maintain data consistency.

How do I prevent unbounded document growth in NoSQL data modeling?▼

Prevent unbounded document growth in NoSQL data modeling by applying aggregate-boundary analysis and using referencing patterns. This prevents silent schema drift and architectural pitfalls caused by unbounded arrays.

Can I use schema versioning strategies to handle MongoDB schema drift?▼

Yes, you can use schema versioning strategies to handle MongoDB schema drift. Implementing versioning within your document data models prevents silent schema drift and maintains consistency during architectural transitions.