database-design-patterns
Database schema design patterns and optimization strategies for relational and NoSQL databases.
Skill by NickCrew
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/nickcrew-database-design-patterns
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, backend, data
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/database-design-patterns
What's inside
- Skill name
database-design-patterns- Description
- Database schema design patterns and optimization strategies for relational and NoSQL databases. Use when designing database schemas, optimizing query performance, or implementing data persistence layers at scale.
- License
- MIT
- Instructions
- 118 lines in SKILL.md · view on GitHub
Files (7)
- SKILL.md
- core-principles.md · references/
- indexing-strategies.md · references/
- partitioning-patterns.md · references/
- query-optimization.md · references/
- replication-patterns.md · references/
- schema-design-patterns.md · references/
SKILL.md (first lines)
# Database Design Patterns Expert guidance for designing scalable database schemas, optimizing query performance, and implementing robust data persistence layers across relational and NoSQL databases. ## When to Use This Skill - Designing database schemas for new applications - Optimizing slow queries and database performance - Choosing between normalization and denormalization strategies - Implementing partitioning, sharding, or replication strategies - Migrating between database technologies (SQL to NoSQL or vice versa) - Designing for high availability and disaster recovery - Implementing caching strategies and read replicas - Scaling databases horizontally or vertically - Ensuring data consistency in distributed systems ## Core Concepts ### Data Modeling Design schemas that reflect business domain, access patterns, and consistency requirements. Balance normalization (data integrity) with denormalization (read performance) based on workload characteristics. ### ACID vs. BASE - **ACID** (Relational): Atomicity, Consistency, Isolation, Durability - strong guarantees - **BASE** (NoSQL): Basically Available, Soft state, Eventually consistent - flexibility ### CAP Theorem Distributed systems choose two of three: Consistency, Availability, Partition Tolerance. ### Polyglot Persistence Use the right database for each use case: PostgreSQL for transactions, MongoDB for documents, Redis for caching, Elasticsearch for search, Cassandra for time-series, Neo4j for graphs. ## Quick Reference | Task | Load reference | | --- | --- | | Core database principles (ACID, BASE, CAP) | `skills/database-design-patterns/references/core-principles.md` | | Schema patterns (normalization, star schema, documents) | `skills/database-design-patterns/references/schema-design-patterns.md` | | Index types and strategies (B-tree, hash, covering) | `skills/database-design-patterns/references/indexing-strategies.md` | | Partitioning and sharding approaches | `skills/database-design-patterns/references/partitioning-patterns.md` | | Replication modes (primary-replica, multi-leader) | `skills/database-design-patterns/references/replication-patterns.md` | | Query optimization and caching | `skills/database-design-patterns/references/query-optimization.md` | ## Workflow ### Phase 1: Requirements Analysis 1. Identify access patterns (read-heavy vs. write-heavy) 2. Determine consistency requirements (strong vs. eventual) 3. Estimate data volume and growth rate 4. Define SLA requirements (latency, availability) ### Phase 2: Schema Design 1. Model entities and relationships 2. Choose normalization level based on workload 3. Design for query patterns, not just storage 4. Consider data distribution strategy (partitioning/sharding) ### Phase 3: Performance Optimization 1. Analyze query execution plans (`EXPLAIN ANALYZE`) 2. Add indexes for frequent queries 3. Implement caching where appropriate 4. Configure connection pooling 5. Monitor and iterate ### Phase 4: Scaling Strategy 1. Implement read replicas for read scaling 2. Consider partitioning for large tables (>100M rows) 3. Plan sharding strategy for horizontal scaling 4. Design for high availability with replication ## Common Mistakes **Over-normalization**: Too many joins slow down reads. Denormalize for read-heavy workloads. **Missing indexes**: Analyze query patterns and add indexes for frequent WHERE/JOIN columns. **Wrong index type**: Use composite indexes with correct column order (equality first, then range). **Ignoring replication lag**: Handle eventual consistency with read-your-writes pattern. **Poor partitioning key**: Choose keys that distribute data evenly and align with query patterns. **N+1 queries**: Use JOINs or batch loading instead of querying in loops. **Inefficient pagination**: Use keyset pagination instead of OFFSET for large datasets. **Connection exhaustion**: Implement connection pooling sized for your workload. ## Best Practices 1. **Model for access patterns** - Design schemas around how data will be queried 2. **Index strategically** - Index frequently queried columns, avoid over-indexing 3. **Partition large tables** - Use for tables >100M rows or time-series data 4. **Replicate for reads** - Primary-replica for read scaling, multi-leader for geo-distribution 5. **Optimize queries** - Analyze execution plans, avoid N+1, use proper pagination 6. **Cache hot data** - Application-level caching with appropriate TTLs 7. **Pool connections** - Size connection pools based on workload 8. **Monitor continuously** - Track query performance, index usage, replication lag 9. **Plan for growth** - Design for 3x current load 10. **Choose consistency wisely** - Match consistency level to business requirements ## Resources **Books**: - "Designing Data-Intensive Applications" (Kleppmann) - "High Performance MySQL" (Schwartz) **Sites**: - use-the-index-luke.com - PostgreSQL documentation - MongoDB documentation **Tools**: - EXPLAIN ANALYZE - pg_stat_statements - Percona Toolkit - pt-query-digest
From NickCrew/Claude-Cortex, MIT.
More from NickCrew/Claude-Cortex
- 0.581score
development-estimation
NickCrew
Use when estimating time, effort, or complexity for features or projects - provides structured estimation workflows with breakdowns, risks, and confidence…
SkillCFreshness: C★ 61Claude Code +9 - 0.581score
code-explanation
NickCrew
Use when explaining code, concepts, or system behavior to a specific audience level - provides a structured explanation workflow with depth control and…
SkillCFreshness: C★ 61Claude Code +9 - 0.581score
compliance-audit
NickCrew
Regulatory compliance auditing across GDPR, HIPAA, PCI DSS, SOC 2, and ISO frameworks with automated evidence collection and gap analysis.
SkillCFreshness: C★ 61Claude Code +9 - 0.581score
dev-workflows
NickCrew
Use when running builds, executing tests, or improving developer experience workflows - provides structured guidance for build/test execution and DX…
SkillCFreshness: C★ 61Claude Code +9 - 0.581score
codex-code-review
NickCrew
Automate code review remediation loops with the codex CLI.
SkillCFreshness: C★ 61Claude Code +9 - 0.581score
build-optimization
NickCrew
Build system optimization covering compilation, caching, incremental builds, and developer tooling.
SkillCFreshness: C★ 61Claude Code +9 - 0.581score
backlog-md
NickCrew
Task tracking system for agents via Backlog.md CLI.
SkillCFreshness: C★ 61Claude Code +9 - 0.581score
api-gateway-patterns
NickCrew
API Gateway patterns for routing, authentication, rate limiting, and service composition in microservices architectures.
SkillCFreshness: C★ 61Claude Code +9 - 0.581score
cqrs-event-sourcing
NickCrew
CQRS and Event Sourcing patterns for scalable, auditable systems with separated read/write models.
SkillCFreshness: C★ 61Claude Code +9 - 0.581score
design-journey-review
NickCrew
Combined visual design and user journey review: color systems, typography, spacing, information density, visual hierarchy, workflow stages, emotional curve…
SkillCFreshness: C★ 61Claude Code +9 - 0.577score
architectural-analysis
NickCrew
User-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI…
SkillCFreshness: C★ 61Claude Code +9 - 0.576score
atomic-commits
NickCrew
Use this skill when a working tree contains uncommitted changes that need to be split into a sequence of atomic commits — typically after a long session, an…
SkillCFreshness: C★ 61Claude Code +9
Signals
- Stars
- 61
- Forks
- 15
- Open issues
- 3
- Last commit (this folder)
- Apr 23, 2026 (6 months ago)
- Last release
- Jun 2, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/NickCrew/Claude-Cortex
- Website
- cortex.atlascrew.dev/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from NickCrew
- 0.581score
code-explanation
NickCrew
Use when explaining code, concepts, or system behavior to a specific audience level - provides a structured explanation workflow with depth control and…
SkillCFreshness: C★ 61Claude Code +9 - 0.581score
cqrs-event-sourcing
NickCrew
CQRS and Event Sourcing patterns for scalable, auditable systems with separated read/write models.
SkillCFreshness: C★ 61Claude Code +9 - 0.581score
api-gateway-patterns
NickCrew
API Gateway patterns for routing, authentication, rate limiting, and service composition in microservices architectures.
SkillCFreshness: C★ 61Claude Code +9 - 0.581score
backlog-md
NickCrew
Task tracking system for agents via Backlog.md CLI.
SkillCFreshness: C★ 61Claude Code +9 - 0.581score
compliance-audit
NickCrew
Regulatory compliance auditing across GDPR, HIPAA, PCI DSS, SOC 2, and ISO frameworks with automated evidence collection and gap analysis.
SkillCFreshness: C★ 61Claude Code +9 - 0.581score
design-journey-review
NickCrew
Combined visual design and user journey review: color systems, typography, spacing, information density, visual hierarchy, workflow stages, emotional curve…
SkillCFreshness: C★ 61Claude Code +9
Cite this page
database-design-patterns skill. Agent Mart. https://agentmart.dev/skills/nickcrew-database-design-patterns (last updated 2026-10-24)