# What is Data Cube?

A data cube enables data to be modeled and viewed in several dimensions. It is represented by dimensions and facts. In other terms, dimensions are the views or entities related to which an organization is required to keep records.

For instance, AllElectronics can create a sales data warehouse to maintain records of the store’s sales-related dimensions time, item, branch, and location. These dimensions enable the store to maintain track of things like monthly sales of items and the branches and locations at which the items were sold.

Each dimension can have a table related to it. It is known as a dimension table, which further represents the dimension. For instance, a dimension table for an item can include the attributes item name, brand, and type. Dimension tables can be determined by users or professionals, or automatically created and adjusted established on data distributions.

A multidimensional data model is generally organized around a central design, like sales, for instance. This design is defined by a fact table. Facts are mathematical measures. Examples of facts for a sales data warehouse contains dollars sold (sales amount in dollars), units sold (number of units sold), and the amount budgeted. The fact table includes the names of the facts or measures and keys to each of the associated dimension tables.

A data cube is generated from a subset of attributes in the database. Specific attributes are selected to be measure attributes, i.e., the attributes whose values are of interest. Other attributes are chosen as dimensions or functional attributes. The measure attributes are aggregated as per the dimensions.

For instance, XYZ can make a sales data warehouse to maintain records of the store's sales for the dimensions time, item, branch, and location. These dimensions allow the store to maintain track of things like monthly sales of items, and the branches and locations at which the items were sold.

Each dimension can have a table recognized with it. It is known as a dimensional table, which defines the dimensions. For example, a dimension table for items can include the attributes item_name, brand, and type.

Data cube techniques are interesting methods with several applications. Data cubes can be sparse in some cases because not every cell in each dimension can have corresponding information in the database. If a query includes constants at even lower levels than those supported in a data cube, it is not clear how to develop the best use of the pre-calculated results saved in the data cube.