A data cube (also written as datacube) is a multi-dimensional array of values used to represent data across multiple dimensions of interest. In computer science and data management, the term is most commonly applied in contexts where these arrays are substantially larger than a hosting computer's main memory, such as multi-terabyte or petabyte-scale data warehouses and time series of image data.
Concept and Structure
Although the name implies a three-dimensional object, a data cube is a general multi-dimensional concept that can be 1-dimensional, 2-dimensional, 3-dimensional, or higher-dimensional. Each dimension divides the data into groups of cells, and each cell within the cube represents a single measure (also called a fact) of interest. For example, in an online analytical processing (OLAP) context, a cube about a company might have dimensions such as subsidiaries, products, and time; a fact would be a sales event describing a particular product sold at a particular subsidiary at a particular time.
Data cubes can be characterized as sparse (where only a few cells hold values, with the rest empty or undefined) or dense (where most or all coordinates hold a value), though there is no strict dividing line between the two categories.
Applications
Business Intelligence and OLAP
In OLAP, data cubes are a common arrangement of business data suitable for analysis from different perspectives. They support operations such as:
- Slicing: picking a rectangular subset by choosing a single value for one dimension, creating a new cube with one fewer dimension.
- Dicing: producing a subcube by selecting specific values across multiple dimensions.
- Drill down/up: navigating between summarized and detailed levels of data along a hierarchy.
- Pivoting: rotating the cube to view its various faces from different perspectives.
- Roll-up: summarizing data along a dimension using aggregate functions such as sum, count, min, or max.
OLAP data is typically stored in a star schema or snowflake schema within a relational data warehouse, or in a special-purpose data management system. Measures are derived from fact tables, while dimensions are derived from dimension tables.
Science and Engineering
Data cubes are widely used to represent spatio-temporal sensor, image, and simulation data. For example:
- A time sequence of color images forms a four-dimensional array with dimensions for image X and Y coordinates, time, and color plane.
- In imaging spectroscopy, a spectrally resolved image is represented as a three-dimensional volume.
- Earth observation data cubes combine satellite imagery (such as from Landsat 8 and Sentinel-2) with geographic information system (GIS) analytics.
Mathematics
In mathematics, a one-dimensional array corresponds to a vector, a two-dimensional array resembles a matrix, and more generally, a tensor may be represented as an n-dimensional data cube.
History
Multi-dimensional arrays have long been familiar in programming languages; Fortran and APL supported such structures early on. However, these early arrays had to fit within main memory and existed only while the maintaining program was running.
In 1992, Peter Baumann introduced management of massive data cubes with high-level user functionality combined with efficient software architecture. Some years later, the data cube concept was applied to time-varying business data by Jim Gray and colleagues, and by Venky Harinarayan, Anand Rajaraman, and Jeffrey Ullman. Gray's 1997 paper, "Data Cube: A Relational Aggregation Operator Generalizing Group-By, Cross-Tab, and Sub-Totals," is considered a foundational contribution in the field.
The EarthServer initiative established geo data cube service requirements, and array database management systems (such as rasdaman, pioneered since 1994) offer generic support for defining, managing, retrieving, and manipulating n-dimensional data cubes.
Standardization
In 2018, the ISO SQL database language was extended with data cube functionality as "SQL – Part 15: Multi-dimensional arrays (SQL/MDA)." Additional standards include:
- Web Coverage Processing Service (WCPS), a geo data cube analytics language issued by the Open Geospatial Consortium in 2008.
- MultiDimensional eXpressions (MDX), an industry standard for querying business data cubes, originally developed by Microsoft.
Data exchange formats supporting data-cube-like data include MDX for statistical and business data, Zarr and Hierarchical Data Format for general scientific data, and TIFF for imagery.
See Also
- OLAP cube
- Multi-dimensional array
- Data warehouse
- Data mining