REL

# Terminology

Frequently used terms are gathered here for easy reference.

Term | Explanation |
---|---|

Argument | One of the expressions between the parentheses of a relational application or the brackets of a partial relational application. |

Arity | Number of elements in the tuples of a relation. If a relation contains tuples of various lengths, the relation has multiple arities. If `N` is the arity of the relation to which an expression `E` evaluates, then `E` is also said to have arity `N` . |

Base relation | A base relation is defined completely by the data it contains. This corresponds to a table in SQL. |

Binary relation | Relation of arity 2. |

Body | The main expression in a definition or a relational abstraction. |

Cardinality | Number of tuples in a relation. |

Column | The k-th column of relation `R` is the set of data values that are the k-th elements of the tuples in `R` . |

Data value | A number, a string, etc. See Values. |

Derived relation | A derived relation is a relation whose content is defined by logical statements. These statements can refer to other relations (base or derived) or refer directly to data values. A derived relation corresponds to a view in SQL. |

Element | A data value in a tuple. Elements are ordered by position from 1 to $N$, where $N$ is the length of the tuple. |

Empty relation | Relation with no tuples (cardinality 0). |

Formula | An expression that evaluates to a relation of arity 0 (i.e., to `true` or `false` ). |

Function | Relation with a functional dependency from the initial elements of a tuple to the last element. |

$n$-ary relation | Relation of arity $n$. |

Nullary relation | Relation of arity 0. There exist only two nullary relations: the empty set `{}` (cardinality 0) and the empty tuple `{()}` (cardinality 1). See Boolean Constant Relations. |

Qualified name | A name that consists of an identifier immediately followed by one or more Symbols, such as `foo:bar:baz` . Equivalent to a partial relational application, such as `foo[:bar, :baz]` . |

Parameter | A variable introduced in the head of a definition or in the “bindings” part of a relational abstraction. |

Relation | A conventional relation is a set of tuples of the same type, a subset of a Cartesian product of data types. A Rel relation may consist of a number of different conventional relations, each of which has tuples of a different type. |

Set | An unsorted collection of items, each of which is unique in the collection. |

Singleton | Relation of cardinality 1 and arity 1. |

Ternary relation | Relation of arity 3. |

Tuple | An ordered list of data values. A relation of cardinality 1 (any arity) is often identified with the tuple that it contains, and vice versa. |

Type | The type of an element in a tuple is always one of Rel’s data types, a value type or an entity type. The type of a tuple is the sequence of the types of its elements. The type of a relation — also known as the type signature — is the type of its tuples. |

Unary relation | Relation of arity 1. |

Was this doc helpful?