Data cube


In computer programming contexts, a data cube is a multi-dimensional array of values. Typically, the term datacube is applied in contexts where these arrays are massively larger than the hosting computer's main memory; examples include multi-terabyte/petabyte data warehouses and time series of image data.
The data cube is used to represent data along some measure of interest.
For example, in OLAP such measures could be the subsidiaries a company has, the products the company offers, and time; in this setup, a fact would be a sales event where a particular product has been sold in a particular subsidiary at a particular time. In satellite image timeseries measures would be Latitude and Longitude coordinates and time; a fact would be a pixel at a given space/time coordinate as taken by the satellite.
Even though it is called a cube, a data cube generally is a multi-dimensional concept which can be 1-dimensional, 2-dimensional, 3-dimensional, or higher-dimensional.
In any case, every dimension represents a separate measure whereas the cells in the cube represent the facts of interest. Sometimes cubes hold only few values with the rest being empty, i.e.: undefined, sometimes most or all cube coordinates hold a cell value. In the first case such data are called sparse, in the second case they are called dense, although there is no hard delineation between both.

History

Multi-dimensional arrays have long been familiar in programming languages. Fortran offers 1-D arrays and arrays of arrays, which allows the construction higher-dimensional arrays. APL supports n-D arrays with a rich set of operations. All these have in common that arrays must fit into main memory and are available only while the particular program maintaining them is running.
A series of data exchange formats support storage and transmission of datacube-like data, often tailored towards particular application domains. Examples include MDX for statistical data, Hierarchical Data Format for general scientific data, and TIFF for imagery.
In 1992, Peter Baumann introduced management of massive datacubes with high-level user functionality combined with an efficient software architecture. Datacube operations include subset extraction, processing, fusion, and in general queries in the spirit of data manipulation languages like SQL.
Some years after, the datacube concept was applied to describe time-varying business data as datacubes by Jim Gray, et al., and by Venky Harinarayan, Anand Rajaraman and Jeff Ullman which rank among the top 500 most cited computer science articles over a 25-year period.
Around that time, a working group on Multi-Dimensional Databases was established at German Gesellschaft für Informatik.
Datacube Inc. was an image processing company selling hardware and software applications for the PC market in 1996, however without addressing datacubes as such.
The EarthServer initiative has established geo data cube service requirements.

Standardization

In 2018, the ISO SQL database language was extended with datacube functionality as "SQL -- Part 15: Multi-dimensional arrays ".
Web Coverage Processing Service is a geo datacube analytics language issued by the Open Geospatial Consortium in 2008. In addition to the common data cube operations, the language knows about the semantics of space and time and supports both regular and irregular grid datacubes, based on the concept of coverage data.
An industry standard for querying business datacubes, originally developed by Microsoft, is MultiDimensional eXpressions.

Implementation

Many high-level computer languages treat data cubes and other large arrays as single entities distinct from their contents.These languages, of which APL, IDL, NumPy, PDL, and S-Lang are examples, allow the programmer to manipulate complete film clips and other data en masse with simple expressions derived from linear algebra and vector mathematics. Some languages distinguish between a list of images and a data cube, while many do not.
Array DBMSs offer a data model which generically supports definition, management, retrieval, and manipulation of n-dimensional datacubes. This database category has been pioneered by the rasdaman system since 1994.

Applications

Multi-dimensional arrays can meaningfully represent spatio-temporal sensor, image, and simulation data, but also statistics data where the semantics of dimensions is not necessarily of spatial or temporal nature. Generally, any kind of axis can be combined with any other into a datacube.

Mathematics

In mathematics, a one-dimensional array corresponds to a vector, a two-dimensional array resembles a matrix; more generally, a tensor may be represented as an n-dimensional data cube.

Science and engineering

For a time sequence of color images, the array is generally four-dimensional, with the dimensions representing image X and Y coordinates, time, and RGB color plane. For example, the EarthServer initiative unites data centers from different continents offering 3-D x/y/t satellite image timeseries and 4-D x/y/z/t weather data for retrieval and server-side processing through the Open Geospatial Consortium WCPS geo datacube query language standard.
A data cube is also used in the field of imaging spectroscopy, since a spectrally-resolved image is represented as a three-dimensional volume.

Business intelligence

In online analytical processing, data cubes are a common arrangement of business data suitable for analysis from different perspectives through operations like slicing, dicing, pivoting, and aggregation.