Command Palette

Search for a command to run...

Назад к скиллам
скилл № 71077

data-modeling

Use when the user asks about relational or graph data modeling: 3NF normalization, surrogate keys, temporal tables, table inheritance, property graph vs RDF…

БесплатноБез исполняемых скриптов
j4flmaoот j4flmao★ 47 звёзд на GitHub

Установить data-modeling в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Data Modeling

Purpose

Design robust, maintainable data models for relational and graph data stores with clear schema design principles, normalization strategies, and traversal patterns.

Agent Protocol

Trigger

Exact user phrases: "data model", "schema design", "normalization", "denormalization", "3NF", "table inheritance", "soft delete", "surrogate key", "graph model", "property graph", "RDF", "knowledge graph", "node edge model", "graph traversal".

Input Context

  • Data store type (relational, graph, or hybrid)
  • Access patterns (OLTP, OLAP, graph queries)
  • Volume and growth expectations
  • Consistency and integrity requirements
  • Existing schema constraints and migration path
  • Team expertise with relational vs graph technologies

Output Artifact

DDL statements, graph schema definitions, migration scripts. No file unless requested.

Response Format

## Entity: {name}
| Field | Type | Constraints | Notes |
|-------|------|-------------|-------|
| {field} | {type} | {constraints} | {notes} |
## Graph: {name}
Nodes: {node types with properties}
Edges: {edge types with properties}
Indexes: {indexed properties}
Traversal: {common query patterns}

No preamble. No postamble. No explanations. No filler/hedging/transitions.

Completion Criteria

  • Entities normalized to appropriate normal form
  • Table inheritance pattern selected (if applicable)
  • Temporal tracking strategy defined (if needed)
  • Soft delete vs hard delete decided per entity
  • Surrogate vs composite key decision documented per table
  • Graph node/edge schema defined with property types
  • Graph traversal patterns identified and indexed
  • Migration strategy defined (expand-contract or in-place)

Max Response Length

200 lines of schema and code.

Workflow

Step 1: Conceptual Model

Identify entities, relationships, and business rules independent of technology. Each entity represents a real-world object or concept. Relationships describe how entities interact. Business rules become constraints and invariants.

Conceptual Model Template

Entity: Order
  Attributes: order_id, order_date, total_amount, status, customer_id
  Relationships:
    belongs_to Customer (many-to-one)
    has_many OrderItem (one-to-many)
    has_many Payment (one-to-many)
Business Rules:
  - Total amount = sum of line items + tax + shipping
  - Order status transitions: draft → submitted → confirmed → shipped → delivered
  - An order cannot be deleted after shipment

Entity Discovery Techniques

Event storming: domain experts place sticky notes for domain events, commands, aggregates. Noun extraction: extract nouns from business requirements and user stories. CRUD analysis: identify create/read/update/delete operations per entity. Data flow mapping: trace data from source to consumption to identify entities.

Step 2: Relational or Graph Decision

Decision Flow

Primary access pattern?
├── Fixed schema, complex joins, ACID required
│   └── Relational database (PostgreSQL, MySQL)
├── Highly connected data, variable-depth traversal
│   └── Graph database (Neo4j, Neptune, Dgraph)
├── Both needed
│   ├── Same data → Hybrid (relational for OLTP, graph for traversal)
│   └── Different data → Choose per workload
└── Schema evolves frequently
    └── Graph database (schemaless by default)

Relational Strengths

ACID transactions, mature ecosystem, strong consistency, complex queries via SQL, reporting and BI tools, well-known operational patterns. Best for: financial systems, inventory management, user accounts, any system requiring strict consistency.

Graph Strengths

Variable-depth traversals (friend-of-friend, supply chain), path-finding (shortest route, influence path), highly connected data queries, schema flexibility. Best for: social networks, recommendation engines, fraud detection (ring analysis), knowledge graphs, network/infrastructure management.

Hybrid Examples

Customer data in PostgreSQL for transactional processing, replicated to Neo4j for recommendation and fraud. Product catalog in PostgreSQL for CMS, with graph for personalized product discovery. Reference data in both with synchronization via CDC.

Step 3: Normalization

Normal Forms Reference

1NF: each column holds atomic values (no arrays, no comma-separated lists), each row is unique, columns within a row are independent. 2NF: 1NF + every non-key column depends on the ENTIRE primary key (eliminate partial dependencies — relevant only for composite keys). 3NF: 2NF + every non-key column depends ONLY on the primary key (eliminate transitive dependencies — where A → B → C means C depends indirectly on A via B). BCNF: 3NF + every determinant is a candidate key. 4NF: BCNF + no multi-valued dependencies. 5NF: 4NF + join dependencies.

Normalization Examples

Unnormalized (one table): | order_id | customer_name | customer_email | product_ids | product_names | quantities | prices |

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • references/data-vault-patterns.md
  • references/dimensional-modeling.md
  • references/domain-driven-data-modeling.md
  • references/graph-modeling.md
  • references/modeling-best-practices.md
  • references/modeling-change-management.md
  • references/modeling-data-contracts.md
  • references/relational-modeling.md

FAQ

Что делает скилл data-modeling?

Use when the user asks about relational or graph data modeling: 3NF normalization, surrogate keys, temporal tables, table inheritance, property graph vs RDF or knowledge graph schemas. Produces a schema-first model with keys, constraints and denormalization rules. Not for Kimball star schemas (use data-dimensional-modeling) or graph DB operations (use data-graph-database).

Как установить скилл data-modeling?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл data-modeling запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить data-modeling с