Logo vun Data Modeling

Data Modeling

Communautéit
jdm4pku
data-modeling

Create entity-relationship diagrams (ERDs) to model data entities, attributes, and relationships. Use when requirements involve structured data and you need to visualize how entities relate to each other.

Iwwersiicht

Editeurjdm4pku
RepositoryRE-Skills
Skill-Nummdata-modeling
Stären
27
Forks
1
Matgeliwwert Fichieren
2
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 2 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum jdm4pku op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Data Modeling an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/jdm4pku/RE-Skills/tree/main/skills/data-modeling
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jdm4pku/RE-Skills.git /tmp/RE-Skills
mkdir -p .claude/skills
cp -r /tmp/RE-Skills/skills/data-modeling .claude/skills/data-modeling
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Data Modeling an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Data Modeling automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Data Modeling net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Purpose

Create entity-relationship diagrams (ERDs) that identify the key data entities, define their attributes, and specify the relationships between them. Use this to translate natural-language requirements and use cases into a formal visual model that exposes hidden assumptions and missing requirements.

This is a conceptual data model, not a physical database schema. It captures what data the system must manage and how pieces of data relate, independent of the technology used to store them.

Key Concepts

ERD Notation Styles

Chen Notation (conceptual, good for stakeholder communication):

SymbolMeaning
RectangleEntity
EllipseAttribute
DiamondRelationship
LineConnection between entity and relationship
Double rectangleWeak entity (depends on another entity for identity)
Underlined attributePrimary key

Crow's Foot Notation (compact, preferred by developers):

SymbolMeaning
RectangleEntity (attributes listed inside)
Line with crow's foot (trident)"Many" side of relationship
Line with single bar"One" side of relationship
Circle on lineOptional participation (zero)
Bar on lineMandatory participation (one)

Cardinality and Participation

Cardinality defines how many instances of one entity relate to another:

CardinalityMeaningExample
1:1One to oneEach lab has exactly one director
1:NOne to manyOne lab contains many chemicals
M:NMany to manyMany chemicals can be in many experiments

Participation defines whether the relationship is mandatory or optional:

  • Total (mandatory): Every instance must participate (a chemical must belong to a lab)
  • Partial (optional): An instance may or may not participate (a chemical may or may not be linked to an experiment)

Identifying Entities from Requirements

Entities are the persistent "things" the system must track. To find them:

  1. Nouns in requirements -- Chemical, Lab, User, Report, Alert
  2. Subjects and objects in use cases -- "The technician adds a chemical" (chemical is an entity)
  3. Data that has its own identity -- If it has a unique identifier, it is likely an entity
  4. Data that has its own attributes -- If you can describe properties of it, it is likely an entity

Not entities:

  • Attributes of entities (chemical_name is an attribute, not an entity)
  • Actions or processes (search, generate, approve)
  • Roles that are really attributes of a User entity

Why This Works

ERDs force you to answer questions that natural-language requirements leave ambiguous:

  • "Can a chemical exist without belonging to a storage location?" (participation constraint)
  • "Can one alert be for multiple chemicals?" (cardinality)
  • "Does a disposed chemical still have a relationship to the lab?" (lifecycle implications)

Every relationship on the ERD implies functional requirements: if Chemical relates to StorageLocation, there must be requirements to create, read, update, and dissolve that relationship.

Anti-Patterns

  • God Entity -- One entity (e.g., "Record") with 50 attributes that should be decomposed into multiple entities
  • Missing Relationship Constraints -- Drawing a line between entities without specifying cardinality or participation
  • Premature Physical Design -- Including junction tables, foreign keys, or indexes at the conceptual stage
  • Orphan Entities -- An entity with no relationships to any other entity (why is it in this system?)

Application

Use template.md for the fill-in structure.

Step 1: Inventory Candidate Entities

Scan requirements documents, use cases, and user stories. List every noun that represents a persistent data object the system manages:

  • Objects that users create or manipulate
  • Objects the system generates (reports, alerts, logs)
  • Reference data (categories, locations, units)
  • External entities that the system must track

For ChemTrack: Chemical, StorageLocation, Lab, User, ExpirationAlert, ComplianceReport, HazardClass, Experiment.

Step 2: Define Attributes for Each Entity

For each entity, list the attributes it possesses. Mark the primary key (unique identifier):

  • Use the data dictionary (skills/data-dictionary/SKILL.md) for detailed attribute definitions
  • At this stage, list attribute names and mark keys; detailed formats belong in the data dictionary

Step 3: Identify Relationships

For each pair of entities, ask: "Does an instance of Entity A relate to an instance of Entity B?"

  • Name the relationship with a verb phrase: Chemical is stored in StorageLocation
  • Determine cardinality: one chemical is stored in one location (1:1) or one location holds many chemicals (1:N)?
  • Determine participation: must every chemical have a storage location (total) or can some be unassigned (partial)?

Step 4: Resolve Many-to-Many Relationships

M:N relationships often hide an associative entity with its own attributes:

  • Chemical M:N Experiment becomes Chemical 1:N ExperimentChemical N:1 Experiment
  • ExperimentChemical has its own attributes: quantity_used, date_added_to_experiment

Step 5: Identify Weak Entities

A weak entity depends on another entity for its identity:

  • ExpirationAlert depends on Chemical (no chemical, no alert)
  • If the parent is deleted, the weak entity must also be deleted or reassigned

Step 6: Draw the ERD

Using either Chen or crow's foot notation:

  1. Place entities as rectangles
  2. Draw relationships between them
  3. Label cardinality and participation on each line
  4. Mark primary keys and foreign keys (crow's foot) or underline keys (Chen)

Step 7: Validate Against Use Cases

Walk through each use case and verify:

  • Every data object referenced in use cases has a corresponding entity
  • Every relationship implied by use case steps is captured in the ERD
  • Cardinality matches business rules (e.g., "each chemical must be in exactly one location")
  • Participation constraints match requirements (e.g., "a chemical may optionally link to an SDS")
  • No entity is orphaned (every entity participates in at least one relationship)
  • ERD is consistent with the data dictionary (skills/data-dictionary/SKILL.md)

Examples

See examples/sample.md for a complete ERD specification for ChemTrack.

Mini example (crow's foot textual representation):

Lab ||--o{ Chemical : "stores"
Chemical ||--|| StorageLocation : "is stored in"
Chemical }o--o{ Experiment : "is used in"
Chemical ||--o{ ExpirationAlert : "triggers"
User ||--o{ Chemical : "manages"

Reading: A Lab stores zero or more Chemicals. A Chemical is stored in exactly one StorageLocation. A Chemical can be used in zero or more Experiments, and an Experiment can use zero or more Chemicals. A Chemical triggers zero or more ExpirationAlerts.

Common Pitfalls

Pitfall 1: Skipping Cardinality Analysis

Symptom: ERD shows entities connected by lines but no cardinality or participation markings.

Consequence: Developers must guess relationship constraints. One developer assumes 1:1, another assumes 1:N. The database design is inconsistent.

Fix: Every relationship line must have cardinality (1:1, 1:N, M:N) and participation (mandatory/optional) specified on both ends.


Pitfall 2: God Entity

Symptom: One entity has 30+ attributes covering multiple concepts (chemical info, storage info, alert info, audit info all in one entity).

Consequence: High coupling, difficult maintenance, unclear ownership.

Fix: Decompose into separate entities. If a group of attributes can have its own identity and lifecycle, it is a separate entity.


Pitfall 3: Ignoring M:N Resolution

Symptom: ERD shows a direct M:N relationship between two entities with no associative entity.

Consequence: Attributes that belong to the relationship (quantity_used, date_assigned) have nowhere to live.

Fix: Resolve M:N into two 1:N relationships through an associative entity. Add relationship-specific attributes to the associative entity.


Pitfall 4: ERD-Data Dictionary Disconnect

Symptom: ERD shows entities and attributes but the data dictionary defines different or additional elements.

Consequence: Two sources of truth that contradict each other.

Fix: ERD entities and attributes must map one-to-one with data dictionary entries. Review both together. See skills/data-dictionary/SKILL.md.

References

Related Skills

  • skills/data-dictionary/SKILL.md -- Detailed attribute definitions for every entity and attribute in the ERD
  • skills/use-case/SKILL.md -- Use cases identify entities and relationships through actor-system interactions
  • skills/srs-document/SKILL.md -- ERD appears in the SRS as part of the analysis models appendix
  • skills/state-modeling/SKILL.md -- State models capture lifecycle behavior of key entities in the ERD

External Frameworks

  • Peter Chen, "The Entity-Relationship Model -- Toward a Unified View of Data" (1976) -- Original ERD notation
  • Karl Wiegers & Joy Beatty, Software Requirements, Third Edition (2013) -- Chapter 13: Specifying Data Requirements
  • Gordon Everest, "Basic Data Structure Models Explained with a Common Example" (1976) -- Crow's foot notation origins

Skill type: Component Dependencies: References skills/data-dictionary/SKILL.md, skills/use-case/SKILL.md Used by: skills/srs-document/SKILL.md, skills/requirements-analysis-process/SKILL.md

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Data Modeling?

Create entity-relationship diagrams (ERDs) to model data entities, attributes, and relationships. Use when requirements involve structured data and you need to visualize how entities relate to each other.

Firwat Data Modeling op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Data Modeling besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Data Modeling an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/jdm4pku/RE-Skills/tree/main/skills/data-modeling an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Data Modeling benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Data Modeling benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Data Modeling domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Data Modeling gratis?

De Skill gëtt vum jdm4pku op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇