Skip to main content

Relationships on C2

On a structural diagram, relationships show durable dependencies: which element knows about, uses, or calls another. The sequence of actions and data exchange over time will be modeled later in data-flow diagrams.

This lesson uses three creation methods: the left panel, the source element's context menu, and selecting a pair of elements while holding Shift. After the first examples, the remaining relationships are created quickly while the lesson focuses on sound dependency-modeling rules.

Create relationships between containers and external systems on C2.

Starting Diagram​

The C2 diagram already contains actors, external systems, business containers, and technical infrastructure. Platform icons were assigned in the previous lesson.

Loading image...
All elements and icons are ready; no relationships have been added

Three Creation Methods​

Create the first relationship from the left panel. The form explicitly asks for the source, target, name, and interaction description.

Loading image...
The source and target are selected directly in the form
Loading image...
The name captures the interaction style while the description clarifies its purpose

For the second method, select the source element and choose the relationship action from its context menu. The source is filled automatically, leaving only the target to select.

Loading image...
The selected element becomes the predefined source
Loading image...
The target and interaction properties are completed in the form

The third method is fastest: select the source, hold Shift, and select the target. SysCraft opens the form with both ends already filled in.

Loading image...
Shift quickly establishes the source and target directly on the diagram

Relationship Hierarchy​

A relationship between containers can refer to a parent C1 relationship. This creates a hierarchy in which a high-level dependency between systems is realized through specific interactions between their containers. Later lessons show how to expand this structure directly from C1.

Loading image...
Container dependencies refine the high-level relationships between systems

What a Structural Relationship Represents​

A structural diagram answers who depends on whom, who knows about whom, and who interacts with whom. It should not repeat system behavior step by step. Use durable relationship names such as REST API interaction, message-broker exchange, or batch data processing.

Several relationships may connect the same pair of elements when they represent different interaction styles. Each data flow can later be bound to one of them, making it easy to identify every process that uses a given protocol or channel.

It may be useful to model database reads and writes separately. This supports independent analysis of query and mutation paths and can inform load separation or a future CQRS design.

Loading image...
Different data-access modes can be represented as separate dependencies

Arrow Direction​

An arrow starts at the element that initiates the interaction and knows how to reach the target. A database or message broker normally does not know its clients or call them. Dependencies therefore point from client containers to the database or broker, not the other way around.

The completed C2 diagram shows the main dependencies between users, external systems, containers, and infrastructure.

Loading image...
The diagram shows durable interaction directions between all elements

Chapters​

  • 00:00 — three ways to create a relationship;
  • 00:10 — creation from the left panel;
  • 00:22 — creation from the context menu;
  • 00:33 — creation with Shift;
  • 00:45 — C1 and C2 relationship hierarchy;
  • 01:07 — purpose of a structural diagram;
  • 01:43 — durable relationship names;
  • 02:03 — several relationships between the same pair;
  • 02:20 — binding data flows to relationships;
  • 02:40 — separate read and write relationships;
  • 02:58 — analytics and CQRS;
  • 03:19 — interaction direction;
  • 03:38 — database dependencies;
  • 04:11 — message-broker dependencies;
  • 04:26 — completed C2.

Previous lesson: Infrastructure on C2.

Next lesson: Hide and Reuse Relationships.