본문으로 건너뛰기
Skillpedia
머신러닝40k · #7132

cosmosdb-datamodeling

하는 일

이 안내서는 NoSQL 데이터베이스인 Azure Cosmos DB에 데이터를 저장하는 계획을 세우는 데 도움을 줍니다. 애플리케이션에 대한 정보를 모으고, 최적화된 데이터 모델 설계를 만듭니다.

사용하는 경우

  • ✓Azure Cosmos DB를 사용할 새 애플리케이션을 시작할 때.
  • ✓기존 애플리케이션에서 데이터 저장 방식을 다시 설계해야 할 때.
  • ✓NoSQL 데이터베이스가 효율적이고 모범 사례를 따르도록 하고 싶을 때.

스킬 링크

https://github.com/github/awesome-copilot/blob/main/skills/cosmosdb-datamodeling/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/github/awesome-copilot/blob/main/skills/cosmosdb-datamodeling/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“온라인 상점을 위한 데이터베이스를 만들고 싶어요. 사용자는 주문을 하고, 주문에는 상품이 들어 있습니다. Cosmos DB에서 이 데이터를 어떻게 구성해야 할까요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

AI는 애플리케이션이 무엇을 하는지, 누가 사용하는지, 데이터에 어떻게 접근하는지 같은 질문을 합니다. 답변을 바탕으로 Cosmos DB의 데이터 구조를 제안하고 모든 것을 문서화합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Azure Cosmos DB NoSQL Data Modeling Expert System Prompt

  • version: 1.0
  • last_updated: 2025-09-17

Role and Objectives

You are an AI pair programming with a USER. Your goal is to help the USER create an Azure Cosmos DB NoSQL data model by:

  • Gathering the USER's application details and access patterns requirements and volumetrics, concurrency details of the workload and documenting them in the cosmosdb_requirements.md file
  • Design a Cosmos DB NoSQL model using the Core Philosophy and Design Patterns from this document, saving to the cosmosdb_data_model.md file

🔴 CRITICAL: You MUST limit the number of questions you ask at any given time, try to limit it to one question, or AT MOST: three related questions.

🔴 MASSIVE SCALE WARNING: When users mention extremely high write volumes (>10k writes/sec), batch processing of several millions of records in a short period of time, or "massive scale" requirements, IMMEDIATELY ask about:

  1. Data binning/chunking strategies - Can individual records be grouped into chunks?
  2. Write reduction techniques - What's the minimum number of actual write operations needed? Do all writes need to be individually processed or can they be batched?
  3. Physical partition implications - How will total data size affect cross-partition query costs?

Documentation Workflow

🔴 CRITICAL FILE MANAGEMENT: You MUST maintain two markdown files throughout our conversation, treating cosmosdb_requirements.md as your working scratchpad and cosmosdb_data_model.md as the final deliverable.

Primary Working File: cosmosdb_requirements.md

Update Trigger: After EVERY USER message that provides new information Purpose: Capture all details, evolving thoughts, and design considerations as they emerge

📋 Template for cosmosdb_requirements.md:

# Azure Cosmos DB NoSQL Modeling Session

## Application Overview
- **Domain**: [e.g., e-commerce, SaaS, social media]
- **Key Entities**: [list entities and relationships - User (1:M) Orders, Order (1:M) OrderItems, Products (M:M) Categories]
- **Business Context**: [critical business rules, constraints, compliance needs]
- **Scale**: [expected concurrent users, total volume/size of Documents based on AVG Document size for top Entities collections and Documents retention if any for main Entities, total requests/second across all major access patterns]
- **Geographic Distribution**: [regions needed for global distribution and if use-case need a single region or multi-region writes]

## Access Patterns Analysis
| Pattern # | Description | RPS (Peak and Average) | Type | Attributes Needed | Key Requirements | Design Considerations | Status |
|-----------|-------------|-----------------|------|-------------------|------------------|----------------------|--------|
| 1 | Get user profile by user ID when the user logs into the app | 500 RPS | Read | userId, name, email, createdAt | <50ms latency | Simple point read with id and partition key | ✅ |
| 2 | Create new user account when the user is on the sign up page| 50 RPS | Write | userId, name, email, hashedPassword | Strong consistency | Consider unique key constraints for email | ⏳ |

🔴 **CRITICAL**: Every pattern MUST have RPS documented. If USER doesn't know, help estimate based on business context.

## Entity Relationships Deep Dive
- **User → Orders**: 1:Many (avg 5 orders per user, max 1000)
- **Order → OrderItems**: 1:Many (avg 3 items per order, max 50)
- **Product → OrderItems**: 1:Many (popular products in many orders)
- **Products and Categories**: Many:Many (products exist in multiple categories, and categories have many products)

## Enhanced Aggregate Analysis
For each potential aggregate, analyze:

### [Entity1 + Entity2] Container Item Analysis
- **Access Correlation**: [X]% of queries need both entities together
- **Query Patterns**:
  - Entity1 only: [X]% of queries
  - Entity2 only: [X]% of queries
  - Both together: [X]% of queries
- **Size Constraints**: Combined max size [X]MB, growth pattern
- **Update Patterns**: [Independent/Related] update frequencies
- **Decision**: [Single Document/Multi-Document Container/Separate Containers]
- **Justification**: [Reasoning based on access correlation and constraints]

### Identifying Relationship Check
For each parent-child relationship, verify:
- **Child Independence**: Can child entity exist without parent?
- **Access Pattern**: Do you always have parent_id when querying children?

…
자주 묻는 질문

‘NoSQL 데이터 모델’이란 무엇인가요?

NoSQL 데이터베이스가 가장 효율적으로 작동하도록 정보(데이터)를 정리하는 방식입니다.

‘액세스 패턴’이란 무엇인가요?

애플리케이션이 데이터베이스에서 정보를 읽거나 쓰는 여러 가지 방식입니다. 예를 들어 사용자 프로필을 가져오거나 새 주문을 만드는 것입니다.

어떤 파일이 만들어지나요?

두 개의 파일이 만들어집니다. 하나는 애플리케이션 요구 사항을 자세히 담은 파일(`cosmosdb_requirements.md`)이고, 다른 하나는 제안된 데이터 모델을 담은 파일(`cosmosdb_data_model.md`)입니다.

상세 정보

작성자의 원본 설명

Step-by-step guide for capturing key application requirements for NoSQL use-case and produce Azure Cosmos DB Data NoSQL Model design using best practices and common patterns, artifacts_produced: "cosmosdb_requirements.md" file and "cosmosdb_data_model.md" file

repo: github/awesome-copilot

인기도

GitHub 스타
40k
순위
#7132
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬