 
Navigation 
Synopsis An unordered set of tuples.
Description In mathematics, given sets
D_{1} , D_{2} , ... D_{n} , a
n ary relation R is characterized by R ⊆ D_{1} × D_{2} × ... × D_{n} .
In other words, R consists of a set of tuples <V_{1}, ..., V_{n}> where each V_{i} is an element of
the set D_{i} . When n = 2, we call the relation a binary relation.
In database theory, a relation is a table with a heading and an unordered set of tuples:
In Rascal, a relation is a set of tuples and is characterized by the type: rel[D_{1} Name_{1}, D_{2} Name_{2}, ..., D_{n} Name_{n}]
See Rascal:Values/Relation and for a description of relations and their operators
(since relations are sets all set operators also apply to them, see Rascal:Values/Set)
and Rascal:Prelude/Relation for functions on relations
(and here again, since relations are sets all set operators also apply to them, see Rascal:Prelude/Set).
Examples
Relations in daily life
Relations in computer science
Relations in Rascal
