Database Reference
In-Depth Information
about this model as presented in a recent document. 66 The plan is to support
multidimensional arrays that can have any number of dimensions. Arrays can
be nested, that is, array cells may contain records (i.e., tuples), which in turn
can contain components that are by themselves multidimensional arrays. An
array structure must be defined first, and after that multiple instances of it
can be created by supplying high watermarks (dimension boundaries) for each
instance. The basic syntax for defining an array (based on Reference 66) is as
follows:
define ArrayName (
{
VaribleName=VariableType
}
)(
{
DimensionName
}
)
where ''
'' means one or more instances
The definition consists of two pairs of brackets. The first pair of brackets
describes the array cell contents. Each element has a name and a data type,
which can be either an array or a scalar. The second pair of brackets describes
the dimensions of the array; these must be integer-valued. For example, given
below is a definition of a three-dimensional array (based on Reference 66)
called climate array, where each cell consists of two floating numbers.
define climate array (temperature = float,
pressure = float) (I , J, K)
A physical array can be created from this definition by specifying sizes of each
dimension. For example, the statement
create climate region as climate array [1024,1024,1024]
will create a new instance of climate array, where each of the respective three
dimensions has a size of 1024. In addition, arrays can be enhanced with user-
defined functions (UDFs) in order to perform transposition, scaling, transla-
tion, and other coordinate transformations.
{}
7.6.2.2 Operators
Several operators on arrays are defined. They fall into two main categories:
structural operators and content-dependent operators. Structural operators
can operate on the structure of the array independent of the data, and content-
dependent operators perform some content-based operation, such as aggrega-
tion, based on data values stored in the array.
Examples of structural operators are Subsample and Reshape . The Sub-
sample operator takes as its input an array A and a predicate specified on
the dimensions of A. It then generates a new array with the same number of
dimensions where the dimension values must satisfy the predicate (e.g., every
10th value of the dimension). Reshape is a more advanced structural oper-
ator that can convert an array to a new one with more or fewer dimensions
possibly with new dimension names, but the same number of cells. Other
structural operators include Structural-Join (SJoin), Add Dimension,
Remove Dimension, Concatenate, and Cross Product.
Content-dependent operators are those whose result depends on the data
that is stored in the input array. A simple example of this kind of operator is
Search WWH ::




Custom Search