mcpField
N
nosql-database-design

nosql-database-design

github.com/aj-geddesData & databases373488 installsUpdated 34w ago
Repository

About nosql-database-design

A skill for developers designing NoSQL schemas with MongoDB and DynamoDB. It covers data modeling, denormalization, and query optimization.

Key features

  1. 01MongoDB document structure design
  2. 02DynamoDB table and index design
  3. 03Embedding versus referencing decisions
  4. 04Query pattern optimization
  5. 05Data denormalization strategies

Use cases

  1. 01Designing MongoDB collections
  2. 02Planning DynamoDB table structures
  3. 03Optimizing NoSQL queries
  4. 04Planning data denormalization

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill nosql-database-design

After installing, type/nosql-database-designin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
document-structure-design.md
dynamodb-item-operations.md
global-secondary-indexes-gsi.md
indexing-in-mongodb.md
schema-validation.md
table-structure.md
scripts/
validate-schema.sh
templates/
migration-template.sql

Details

From the project README

NoSQL Database Design

Table of Contents

Overview

Design scalable NoSQL schemas for MongoDB (document) and DynamoDB (key-value). Covers data modeling patterns, denormalization strategies, and query optimization for NoSQL systems.

When to Use

  • MongoDB collection design
  • DynamoDB table and index design
  • Document structure modeling
  • Embedding vs. referencing decisions
  • Query pattern optimization
  • NoSQL indexing strategies
  • Data denormalization planning

Quick Start

Minimal working example:

// Single document with embedded arrays
db.createCollection("users");

db.users.insertOne({
  _id: ObjectId("..."),
  email: "[email protected]",
  name: "John Doe",
  createdAt: new Date(),

  // Embedded address
  address: {
    street: "123 Main St",
    city: "New York",
    state: "NY",
    zipCode: "10001",
  },

  // Embedded array of items
  orders: [
    {
      orderId: ObjectId("..."),
      date: new Date(),
      total: 149.99,
    },
    {
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
Document Structure DesignDocument Structure Design
Indexing in MongoDBIndexing in MongoDB
Schema ValidationSchema Validation
Table StructureTable Structure
Global Secondary Indexes (GSI)Global Secondary Indexes (GSI)
DynamoDB Item OperationsDynamoDB Item Operations

Best Practices

✅ DO
  • Follow established patterns and conventions
  • Write clean, maintainable code
  • Add appropriate documentation
  • Test thoroughly before deploying
❌ DON'T
  • Skip testing or validation
  • Ignore error handling
  • Hard-code configuration values

Comments

Markdown supported