본문으로 건너뛰기
Skillpedia
데이터베이스48k · #5310

nosql-expert

하는 일

이 전문가는 Cassandra나 DynamoDB 같은 분산 NoSQL 데이터베이스를 설계하도록 돕습니다. 전통적인 데이터베이스처럼 데이터를 구성하기보다, 여러분이 던질 질문을 기준으로 데이터를 정리하는 데 초점을 맞춥니다.

사용하는 경우

  • ✓데이터와 사용자가 많은 시스템을 계획할 때.
  • ✓여러 종류의 NoSQL 데이터베이스 중에서 고를 때.
  • ✓기존 NoSQL 데이터베이스의 느린 문제를 해결하려는 경우.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/nosql-expert/SKILL.md

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

사용 방법

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

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

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

AI에게 요청하는 예시

“사용자 ID로 빠르게 조회할 수 있도록 사용자 정보와 주문을 저장하는 DynamoDB 테이블 설계를 도와주세요.”

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

작동 방식

먼저 어떤 쿼리를 실행할지 생각하도록 가르칩니다. 그다음 그 쿼리가 최대한 빠르도록 데이터를 정리합니다. 이때 정보를 일부 반복하는 것도 필요할 수 있습니다.

기술 내용 (원본 SKILL.md)

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

NoSQL Expert Patterns (Cassandra & DynamoDB)

Overview

This skill provides professional mental models and design patterns for distributed wide-column and key-value stores (specifically Apache Cassandra and Amazon DynamoDB).

Unlike SQL (where you model data entities), or document stores (like MongoDB), these distributed systems require you to model your queries first.

When to Use

  • Designing for Scale: Moving beyond simple single-node databases to distributed clusters.
  • Technology Selection: Evaluating or using Cassandra, ScyllaDB, or DynamoDB.
  • Performance Tuning: Troubleshooting "hot partitions" or high latency in existing NoSQL systems.
  • Microservices: Implementing "database-per-service" patterns where highly optimized reads are required.

The Mental Shift: SQL vs. Distributed NoSQL

Feature SQL (Relational) Distributed NoSQL (Cassandra/DynamoDB)
Data modeling Model Entities + Relationships Model Queries (Access Patterns)
Joins CPU-intensive, at read time Pre-computed (Denormalized) at write time
Storage cost Expensive (minimize duplication) Cheap (duplicate data for read speed)
Consistency ACID (Strong) BASE (Eventual) / Tunable
Scalability Vertical (Bigger machine) Horizontal (More nodes/shards)

The Golden Rule: In SQL, you design the data model to answer any query. In NoSQL, you design the data model to answer specific queries efficiently.

Core Design Patterns

1. Query-First Modeling (Access Patterns)

You typically cannot "add a query later" without migration or creating a new table/index.

Process:

  1. List all Entities (User, Order, Product).
  2. List all Access Patterns ("Get User by Email", "Get Orders by User sorted by Date").
  3. Design Table(s) specifically to serve those patterns with a single lookup.

2. The Partition Key is King

Data is distributed across physical nodes based on the Partition Key (PK).

  • Goal: Even distribution of data and traffic.
  • Anti-Pattern: Using a low-cardinality PK (e.g., status="active" or gender="m") creates Hot Partitions, limiting throughput to a single node's capacity.
  • Best Practice: Use high-cardinality keys (User IDs, Device IDs, Composite Keys).

3. Clustering / Sort Keys

Within a partition, data is sorted on disk by the Clustering Key (Cassandra) or Sort Key (DynamoDB).

  • This allows for efficient Range Queries (e.g., WHERE user_id=X AND date > Y).
  • It effectively pre-sorts your data for specific retrieval requirements.

4. Single-Table Design (Adjacency Lists)

Primary use: DynamoDB (but concepts apply elsewhere)

Storing multiple entity types in one table to enable pre-joined reads.

PK (Partition) SK (Sort) Data Fields...
USER#123 PROFILE { name: "Ian", email: "..." }
USER#123 ORDER#998 { total: 50.00, status: "shipped" }
USER#123 ORDER#999 { total: 12.00, status: "pending" }
  • Query: PK="USER#123"
  • Result: Fetches User Profile AND all Orders in one network request.

5. Denormalization & Duplication

Don't be afraid to store the same data in multiple tables to serve different query patterns.

  • Table A: users_by_id (PK: uuid)
  • Table B: users_by_email (PK: email)

Trade-off: You must manage data consistency across tables (often using eventual consistency or batch writes).

Specific Guidance

Apache Cassandra / ScyllaDB

  • Primary Key Structure: ((Partition Key), Clustering Columns)
  • No Joins, No Aggregates: Do not try to JOIN or GROUP BY. Pre-calculate aggregates in a separate counter table.
  • Avoid ALLOW FILTERING: If you see this in production, your data model is wrong. It implies a full cluster scan.
  • Writes are Cheap: Inserts and Updates are just appends to the LSM tree. Don't worry about write volume as much as read efficiency.
  • Tombstones: Deletes are expensive markers. Avoid high-velocity delete patterns (like queues) in standard tables.

AWS DynamoDB

  • GSI (Global Secondary Index): Use GSIs to create alternative views of your data (e.g., "Search Orders by Date" instead of by User).
    • Note: GSIs are eventually consistent.

…

자주 묻는 질문

초보자에게 SQL과 NoSQL의 주된 차이는 무엇인가요?

SQL에서는 관계를 가진 테이블로 데이터를 정리한 뒤 어떤 질문이든 할 수 있습니다. NoSQL(Cassandra, DynamoDB 등)에서는 여러분이 할 특정 질문을 생각하며 데이터를 정리하므로, 답을 매우 빠르게 얻을 수 있습니다.

‘핫 파티션(hot partition)’이란 무엇인가요?

많은 데이터나 접근이 데이터베이스의 한 지점에 몰려 병목이 생기고 시스템이 느려지는 상태입니다. 목표는 모든 것을 고르게 나누는 것입니다.

MongoDB 같은 데이터베이스에도 이 에이전트를 쓸 수 있나요?

이 에이전트는 Cassandra나 DynamoDB 같은 와이드 컬럼과 키-값 NoSQL 데이터베이스에 초점을 맞춥니다. MongoDB는 다른 유형(문서형)이라 다른 접근이 필요할 수 있습니다.

상세 정보

작성자의 원본 설명

Expert guidance for distributed NoSQL databases (Cassandra, DynamoDB). Focuses on mental models, query-first modeling, single-table design, and avoiding hot partitions in high-scale systems.

repo: sickn33/agentic-awesome-skills

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬