Also found in: Dictionary, Thesaurus, Medical, Legal, Acronyms, Wikipedia.


(computer science)
A horizontal row of data items in a relational data structure; corresponds to a record or segment in other types of data structures.




In functional languages, a data object containing two or more components. Also known as a product type or pair, triple, quad, etc. Tuples of different sizes have different types, in contrast to lists where the type is independent of the length. The components of a tuple may be of different types whereas all elements of a list have the same type. Examples of tuples in Haskell notation are (1,2), ("Tuple",True), (w,(x,y),z). The degenerate tuple with zero components, written (), is known as the unit type since it has only one possible value which is also written ().

The implementation of tuples in a language may be either "lifted" or not. If tuples are lifted then (bottom,bottom) /= bottom and the evaluation of a tuple may fail to terminate. E.g. in Haskell:

f (x,y) = 1 --> f bottom = bottom f (bottom,bottom) = 1

With lifted tuples, a tuple pattern is refutable. Thus in Haskell, pattern matching on tuples is the same as pattern matching on types with multiple constructors (algebraic data types) - the expression being matched is evaluated as far as the top level constructor, even though, in the case of tuples, there is only one possible constructor for a given type.

If tuples are unlifted then (bottom, bottom) = bottom and evaluation of a tuple will never fail to terminate though any of the components may. E.g. in Miranda:

f (x,y) = 1 --> f bottom = 1 f (bottom,bottom) = 1

Thus in Miranda, any object whose type is compatible with a tuple pattern is assumed to match at the top level without evaluation - it is an irrefutable pattern. This also applies to user defined data types with only one constructor. In Haskell, patterns can be made irrefutable by adding a "~" as in

f ~(x,y) = 1.

If tuple constructor functions were strict in all their arguments then (bottom,x) = (x,bottom) = bottom for any x so matching a refutable pattern would fail to terminate if any component was bottom.


(1) In a relational database, a tuple is one record (one row). See record and relational database.

(2) A set of values passed from one programming language to another application program or to a system program such as the operating system. Typically separated by commas, the values may be parameters for a function call or a set of data values for a database. See function.
References in periodicals archive ?
A] is simple; it amounts to adding initialization flags to each field of tuple types:
Problem statement: Find a differentiable bijective mapping function m that takes as input the tuples of the input image and outputs a new set of tuples whose statistics match the statistics of the target tuples.
A logical query is the action of evaluating a Boolean expression concerning tuples and relations.
In the following, we verified the Disk-Cyclicity Criterion and the Codiskcyclicity Criterion for the tuple T = ([T.
OnWallSMS works as follows: (1) The operator randomly chooses a tuple ([v.
According to these conditions, each tuple instance will find its suitable cleaning method, thus achieve a cleaning strategy with the minimum total costs.
Let us pick an arbitrary tuple [MATHEMATICAL EXPRESSION NOT REPRODUCIBLE IN ASCII], and let us show that for this tuple, the interval [MATHEMATICAL EXPRESSION NOT REPRODUCIBLE IN ASCII] is contained in the interval [MATHEMATICAL EXPRESSION NOT REPRODUCIBLE IN ASCII].
By virtual join, tuple ids are propagated from the target relation to the non-target relations.
A Describe Associator is a unary algebraic operator that takes as input the resulting relation of the Associator and for each tuple of this relation, it generates, from not null l attributes of the tuple, all the different subsets of specific size like {{a},{l-a},s}, where {a} is named antecedent subset and {l-a} consequent subset.
Figure 3 shows the centroid that indicates the "Project Risk" is inferred to be "Low" at the 2 tuple proportional membership level of ((Risk is Absent, 0%, Risk is Low, 100%)
In this section we introduce a greedy algorithm with bottom-up approach called SpatialDistance (SD) algorithm which considers every tuple as a point in the Euclidean space.