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가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
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.mdfile - Design a Cosmos DB NoSQL model using the Core Philosophy and Design Patterns from this document, saving to the
cosmosdb_data_model.mdfile
🔴 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:
- Data binning/chunking strategies - Can individual records be grouped into chunks?
- 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?
- 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.
댓글
- …
이 저장소의 다른 스킬
acquire-codebase-knowledge
40k에이전트가 기존 코드 프로젝트를 이해하고 문서화하도록 돕습니다. 새 구성원을 맞이하거나 아키텍처를 개괄적으로 파악할 때 유용합니다.
acreadiness-assess
40k에이전트가 프로젝트의 AI 준비 상태를 평가하고 보고서를 만들도록 합니다. 프로젝트가 AI 도구를 쓸 준비가 얼마나 되어 있는지 이해하는 데 유용합니다.
acreadiness-generate-instructions
40k에이전트가 평가 결과를 바탕으로 AI 도구를 위한 지침을 만들도록 돕습니다. AI가 코드와 상호작용하는 방식을 개선하고 확인된 공백을 메울 때 유용합니다.
acreadiness-policy
40k에이전트가 AI 프로젝트 평가를 위한 정책을 정의하거나 적용하도록 돕습니다. 프로젝트 평가 방식을 표준화하고 규정 준수를 보장할 때 유용합니다.