Relationship Types vs Relationships

Beginner

Relationship Types vs Relationships

Relationship Type (Metamodel / M2)

A Relationship Type defines a kind of connection between elements.

  • Created in the metamodel layer
  • Has a name (e.g., "runs_on", "manages", "depends_on")
  • Can have properties (e.g., a "manages" relationship might have a "since" date property)
  • Needs Allowed Connections to specify which Node Types it can connect
  • Found under Relationship Types in the Tree View

Relationship (Model / M1)

A Relationship is a concrete connection between two specific nodes.

  • Created in the model layer
  • Connects a source node to a target node
  • Follows the rules set by Allowed Connections
  • Has specific property values
  • Shown as arrows/lines on the canvas
  • Found under Relationships in the Tree View

How to Create Each

Creating a Relationship Type:

  1. In the Tree View, find the Relationship Types section
  2. Click the + button
  3. Give it a name (e.g., "runs_on")
  4. Add properties if needed in the Properties Panel
  5. Important: Set up Allowed Connections to define which Node Types this relationship can connect

Creating a Relationship (Instance):

  1. On the canvas, hover over a node to see connection handles (small circles)
  2. Click and drag from a handle on the source node
  3. Drop on the target node
  4. If multiple relationship types are allowed, a popup lets you choose which one
  5. The relationship appears as a line/arrow between the nodes

Example

Relationship Type (M2)Relationships (M1)
runs_onpayment-service → web-server-01
managesAlice → Bob
depends_onauth-service → database-service