---
title: "Relations"
weight: 20
summary: "Relations describe how elements interact with each other."
---

# Relations

**Relations** describe how elements interact with each other. They are the lines connecting the boxes in your diagram.

## Syntax

```sruja
<!-- partial -->
import { * } from 'sruja.ai/stdlib'


// Relations use element IDs
Source -> Destination "Label"
// When referring to nested elements, use fully qualified names:
System.Container -> System.Container.Component "Label"
```

Or with a technology/protocol:

```sruja
<!-- partial -->
Source -> Destination "Label" {
technology "HTTPS/JSON"
}
```

## Example

```sruja
// partial
import { * } from 'sruja.ai/stdlib'


BankingSystem = system "Internet Banking System" {
WebApp = container "Web Application"
DB = database "Database"
}

User = person "User"

User -> BankingSystem.WebApp "Visits"
BankingSystem.WebApp -> BankingSystem.DB "Reads Data"
```

Use clear, unique IDs to reference relation endpoints.

## See Also

- [Scenario](docs/concepts/scenario.md)
- [Validation](docs/concepts/validation.md)
