# Data cube

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Data_cube
> Markdown URL: https://mediated.wiki/source/Data_cube.md
> Source: https://en.wikipedia.org/wiki/Data_cube
> Source revision: 1342768423
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Short description|Multi-dimensional data structure}}
{{for|the company|Datacube Inc.}}

In [computer programming](/source/computer_programming), a '''data cube''' (or '''datacube''') is a [multi-dimensional array](/source/multi-dimensional_array) of values. Typically, the term "data cube" is applied in contexts where these arrays are massively larger than the hosting computer's main memory; examples include multi-terabyte/petabyte [data warehouse](/source/data_warehouse)s and [time series](/source/time_series) of image data.
Even though it is called a ''[cube](/source/cube)'', a data cube generally is a multi-dimensional concept which can be 1-dimensional, 2-dimensional, 3-dimensional, or higher-dimensional.

The data cube is used to represent [data](/source/data) (sometimes called ''facts'') along some dimensions of interest.
In [satellite image](/source/satellite_image) timeseries, dimensions would be latitude and longitude coordinates and time; a fact (sometimes called measure) would be a [pixel](/source/pixel) at a given space and time as taken by the satellite.
For example, in [online analytical processing](/source/online_analytical_processing), an [OLAP cube](/source/OLAP_cube) about a company would have dimensions that could be the company subsidiaries, the company products, 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 any case, every dimension divides data into groups of cells whereas each cell in the cube represents a single measure of interest. Sometimes cubes hold only a few values with the rest being ''empty'', i.e. undefined, while sometimes most or all cube coordinates hold a cell value. In the first case such data are called ''sparse'', and in the second case they are called ''dense'', although there is no hard delineation between the two.

Data cubes may be stored in [database management systems](/source/database_management_systems) (DBMS) as part of [array DBMS](/source/array_DBMS).
[Spatio-temporal database](/source/Spatio-temporal_database)s and [geospatial database](/source/geospatial_database)s may also be represented as [coverage data](/source/coverage_data).

== History ==
Multi-dimensional arrays have long been familiar in programming languages. [Fortran](/source/Fortran) offers arbitrarily-indexed 1-D arrays and arrays of arrays, which allows the construction of higher-dimensional arrays, up to 15 dimensions. [APL](/source/APL_(programming_language)) supports n-D arrays with a rich set of operations. All these have in common that arrays must fit into the main memory and are available only while the particular program maintaining them (such as image processing software) is running.

A series of data exchange formats support storage and transmission of data cube-like data, often tailored towards particular application domains. Examples include [MDX](/source/MultiDimensional_eXpressions) for statistical (in particular, business) data, [Zarr](/source/Zarr_(data_format)) and [Hierarchical Data Format](/source/Hierarchical_Data_Format) for general scientific data, and [TIFF](/source/TIFF) for imagery.

In 1992, [Peter Baumann](/source/Peter_Baumann_(computer_scientist)) introduced management of massive data cubes with high-level user functionality combined with an efficient software architecture.<ref>{{cite conference |title= Language Support for Raster Image Manipulation in Databases |last1= Baumann |first1= Peter |date= April 1992 |publisher= Springer |book-title= Graphics Modeling and Visualization in Science and Technology |publication-date = 1993 |pages= 236–45 |location= Darmstadt, Germany |conference= Int. Workshop on Graphics Modeling, Visualization in Science & Technology|doi= 10.1007/978-3-642-77811-7_19 }}</ref> Datacube operations include subset extraction, processing, fusion, and in general queries in the spirit of [data manipulation language](/source/data_manipulation_language)s like [SQL](/source/SQL).

Some years after, the data cube concept was applied to describe time-varying business data as data cubes by [Jim Gray](/source/Jim_Gray_(computer_scientist)), et al.,<ref>{{cite journal |last1 = Gray |first1 = Jim |last2 = Chaudhuri |first2 =  Surajit |last3 = Bosworth |first3 = Adam |last4 = Layman |first4 = Andrew |last5 = Reichart |first5 = Don |last6 = Venkatrao |first6 = Murali |last7 = Pellow |first7 = Frank |last8 = Pirahesh |first8 = Hamid |title = Data Cube: A Relational Aggregation Operator Generalizing Group-By, Cross-Tab, and Sub-Totals |date = January 1997 |journal = Data Mining and Knowledge Discovery |volume = 1 |issue = 1|pages = 29–53 |doi = 10.1023/A:1009726021843 |s2cid = 12502175 }}</ref> and by [Venky Harinarayan](/source/Venky_Harinarayan), [Anand Rajaraman](/source/Anand_Rajaraman) and [Jeff Ullman](/source/Jeff_Ullman)<ref>{{cite book |last1 = Harinarayan |first1 = Venky |last2 = Rajaraman |first2 = Anand |last3 = Ullman |first3 = Jeffrey D. |title = Proceedings of the 1996 ACM SIGMOD international conference on Management of data – SIGMOD '96 |chapter = Implementing data cubes efficiently |pages = 205–16 | year= 1996 | volume =25| number =2| publisher = [ACM SIGMOD](/source/ACM_SIGMOD) | doi = 10.1145/233269.233333 |citeseerx = 10.1.1.41.1205 |isbn = 978-0897917940 |s2cid = 3104453 }}</ref>.

Around that time, a working group on Multi-Dimensional Databases ("Arbeitskreis Multi-Dimensionale Datenbanken") was established at German [Gesellschaft für Informatik](/source/Gesellschaft_f%C3%BCr_Informatik).<ref>{{Cite web |url= http://dblp.uni-trier.de/db/journals/gidr/gidr19.html#BaumannL97|title= Datenbank Rundbrief, Ausgabe 19, Mai 1997| work = dblp | publisher = Uni Trier | place = DE}}</ref><ref>{{Cite web |url= http://dblp.uni-trier.de/db/journals/gidr/gidr23.html#Baumann99|title= Datenbank Rundbrief, Ausgabe 23, Mai 1999| work = dblp | publisher = Uni Trier | place = DE}}</ref>

[Datacube Inc.](/source/Datacube_Inc.) was an [image processing](/source/image_processing) company selling [hardware](/source/computer_hardware) and [software](/source/software) applications for the [PC market](/source/Personal_computer) in 1996, however without addressing data cubes as such.

The EarthServer initiative has established geo data cube service requirements.<ref>{{Cite web|title = The DatabaseManifesto |url = http://www.earthserver.eu/tech/datacube-manifesto|website = Earth server |access-date = 2017-09-21 | place = EU}}</ref>

== Standardization ==
In 2018, the [ISO](/source/ISO) [SQL](/source/SQL) database language was extended with data cube functionality as "SQL – Part 15: Multi-dimensional arrays (SQL/MDA)".<ref>{{Cite web| publisher = ISO/IEC| work = DIS 9075-15 Information technology – Database languages – SQL | title = Part 15: Multi-dimensional arrays (SQL/MDA) | url = https://www.iso.org/standard/67382.html?browse=tc | access-date = 2018-05-27}}</ref>

[Web Coverage Processing Service](/source/Web_Coverage_Processing_Service) is a geo data cube analytics language issued by the [Open Geospatial Consortium](/source/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 data cubes, based on the concept of [coverage data](/source/coverage_data).

An industry standard for querying business data cubes, originally developed by [Microsoft](/source/Microsoft), is [MultiDimensional eXpressions](/source/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 [Fortran](/source/Fortran), [APL](/source/APL_programming_language), [IDL](/source/IDL_(programming_language)), [NumPy](/source/NumPy), [PDL](/source/Perl_Data_Language), and [S-Lang](/source/S-Lang) are examples, allow the programmer to manipulate complete [film](/source/film) clips and other data en masse with simple expressions derived from [linear algebra](/source/linear_algebra) and [vector](/source/vector_(geometric)) mathematics. Some languages (such as PDL) distinguish between a [list](/source/list_(computing)) of images and a data cube, while many (such as IDL) do not.

[Array DBMS](/source/Array_DBMS)s (Database Management Systems) offer a data model which generically supports definition, management, retrieval, and manipulation of n-dimensional data cubes. This database category has been pioneered by the [rasdaman](/source/rasdaman) system since 1994.<ref>{{Cite web|title = Management of Multidimensional Discrete Data |url = http://www.vldb.org/journal/VLDBJ3/P401.pdf |website = VLDB |access-date = 2017-09-21}}</ref>

== 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 data cube.

=== Mathematics ===
In mathematics, a one-dimensional array corresponds to a vector, a two-dimensional array resembles a [matrix](/source/Matrix_(mathematics)); more generally, a [tensor](/source/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](/source/RGB) (or other [color space](/source/color_space)) color plane. For example, the EarthServer initiative<ref>{{Cite web|title = EarthServer - Big Datacube Analytics at Your Fingertips|url = http://www.earthserver.eu/ | place = EU |website = Earth server |access-date = 2017-03-31}}</ref> 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](/source/Open_Geospatial_Consortium) [https://www.ogc.org/standard/wcps/#:~:text=The%20OGC%C2%AE%20Web%20Coverage,%2C%20image%2C%20or%20statistics%20data. WCPS] geo data cube query language standard.

A data cube is also used in the field of [imaging spectroscopy](/source/imaging_spectroscopy), since a spectrally-resolved image is represented as a three-dimensional volume. Earth observation data cubes combine satellite imagery such as [Landsat 8](/source/Landsat_8) and [Sentinel-2](/source/Sentinel-2) with [Geographic information system](/source/Geographic_information_system) analytics.<ref>{{cite journal |last1=Kopp |first1=Steve |last2=Becker |first2=Peter |last3= Doshi |first3=Abhijit |last4=Wright |first4=Dawn J. |last5=Zhang |first5=Kaixi |last6=Xu |first6=Hong |title=Achieving the Full Vision of Earth Observation Data Cubes |journal=Data |date= 2019 |volume=4 |issue=3 |pages=94 |doi=10.3390/data4030094 |doi-access=free }}</ref>

=== Business intelligence ===
In [online analytical processing](/source/online_analytical_processing) (OLAP), data cubes are a common arrangement of business data suitable for analysis from different perspectives through operations like slicing, dicing, pivoting, and aggregation.

== See also ==
* [Array DBMS](/source/Array_DBMS)
* [rasdaman](/source/rasdaman)
* [OLAP cube](/source/OLAP_cube)
* [Australian Geoscience Data Cube](/source/Australian_Geoscience_Data_Cube)
* [Graph (discrete mathematics)](/source/Graph_(discrete_mathematics))
* [Abstract semantic graph](/source/Abstract_semantic_graph)
* [Apache Kylin](/source/Apache_Kylin)

==References==
{{Reflist}}

{{DEFAULTSORT:Data Cube}}
<!--Categories-->
Category:Image processing
Category:Database theory

---
Adapted from the Wikipedia article [Data cube](https://en.wikipedia.org/wiki/Data_cube) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Data_cube?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
