## About

A relationship can be described/implemented by:

## Articles Related

## Type

### Function

A relationship can be represented as a function

Example with a three element (ternary) relationship: <MATH> y = f(x,z) </MATH>

### Operator

A binary relationship can be represented as an operator <MATH> y <= x </MATH>

### Set of tuples

A relationship can be represented as a set of tuples of every entity identifier.

For instance, the relation less than or equal (⇐) on the set of integers {1, 2, 3} is the set of tuple:

```
<1, 1>
<1, 2>
<1, 3>
<2, 2>
<2, 3>
<3, 3>
```

The set of tuples can physically be implemented as:

- in a relational database
- or a bridge table

- in code:
- a field from an object A with the id value of an object B
- or a association class

### Graphic

The relationship less than or equal (y⇐x) can be represented in the set <math>R</math> against <math>R^2</math> as the below gray area:

### Association

The below diagram defines two associations:

- a book is published by one publisher and a publisher publishes
**many**books - a book is written by
**many**author and a author writes**many**books