Database Reference
In-Depth Information
6.1 Introduction to MDX
6.1.1 Tuples and Sets
Two fundamental concepts in MDX are tuples and sets. Intuitively, a tuple
identifies a single cell in a multidimensional cube. A tuple is defined by stating
one member from one or several dimensions of the cube.
Köln
Berlin
Lyon
Paris
Q1
Q2
Q3
Q4
Produce
Seafood
Beverages
Condiments
Product (Category)
Fig. 6.1 A simple three-dimensional cube with one measure
Consider, for example, the cube given in Fig. 6.1 . The cell in the top left
corner with value 21 corresponds to the sales of beverages in Paris in the first
quarter. To identify such cell, we just need to provide the coordinates of each
dimension as follows:
(Product.Category.Beverages, Time.Quarter.Q1, Customer.City.Paris)
Notice that in the above expression, we stated the coordinate for each of
the three dimensions in the format Dimension.Level.Member . As we will see
later, in MDX there are several ways to specify a member of a dimension.
In particular, the order of the members is not significant, and the previous
tuple can also be stated as follows:
(Time.Quarter.Q1, Product.Category.Beverages, Customer.City.Paris)
Since a tuple points to a single cell, then it follows that each member in the
tuple must belong to a different dimension.
A set is a collection of tuples defined using the same dimensions. For
example, the following set
{ (Product.Category.Beverages, Time.Quarter.Q1, Customer.City.Paris)
(Product.Category.Beverages, Time.Quarter.Q1, Customer.City.Lyon) }
 
Search WWH ::




Custom Search