Skill Details
Runtime
(claude-4-6-sonnet)
Example user message
[userMessage]: We're building a social app with posts, follows, likes, and comments. Should we use MongoDB or PostgreSQL?
Example agent response
Classifying your workload first.
Workload type: OLTP — user-facing, mixed read/write, low latency required.
Data shape: Highly relational. Posts belong to users, likes belong to posts and users, follows are a many-to-many relationship between users, comments nest under posts.
Recommendation: PostgreSQL.
MongoDB's document model gives you a locality advantage when one root entity owns everything beneath it — a résumé, a product listing, a user profile. Your social app is not that. You have entities that reference each other in every direction. Storing that in MongoDB means either deeply nested documents that become impossible to query across, or storing IDs and doing manual joins in application code — which is slower, more error-prone, and gives up the one thing MongoDB is actually good at.
PostgreSQL handles this with proper foreign keys, join indexes, and referential integrity enforced at the database level. Add Redis in front for feed caching and session storage once you need it.
Stack: PostgreSQL as your primary store, Redis for caching hot feeds and sessions
By purchasing this skill, you agree to our terms of service
CLAUDE-4-6-SONNET
A SKILL.md agent skill grounded in Designing Data-Intensive Applications (2nd Ed.). Installs expert data architecture decision frameworks directly into any compatible AI agent — Claude Code, Codex CLI, Cursor, Gemini CLI, and 20+ others. Covers database selection, scaling strategy, replication, sharding, transactions, consistency models, CDC pipelines, batch and stream processing, and schema evolution. Includes 10 fully worked architecture decisions with trade-off analysis.
...more
Updated 4 days ago
