Concepts of mdx

Source: Internet
Author: User
Tags relational database table

1) Cube)
Multi-dimensional data sets are the main object in Online Analytical Processing (OLAP). They are a technology that allows quick access to data in a data warehouse. A multi-dimensional dataset is a collection of data. It is usually constructed from a subset of a data warehouse, and is organized and aggregated into a multi-dimensional structure defined by a set of dimensions and measurement values.

2) dimension (dimensionality)
Is the structural feature of a multi-dimensional dataset. They are organized hierarchies (levels) used to describe data types in fact tables ). These categories and levels describe similar member sets based on which the user analyzes. 3) Metadata

Structure Model of Data and Applications in different OLAP components. Metadata describes objects such as tables, data warehouses, and multidimensional datasets in the OLTP database, and records which applications reference different record blocks.

4) hierarchies)
Relational databases organize data in the form of two-dimensional flat tables. These tables have a column dimension and a row dimension. There is only one data element at the intersection of each row and column. Multi-dimensional databases are different. They are based on a structure called "multi-dimensional dataset ,. A multi-dimensional dataset organizes data in a hierarchy instead of a table.

5) level (levels)
A level is an element of a dimension hierarchy. Level describes the data hierarchy, from the highest (most summarized) level of data to the lowest (most detailed) level;

Each dimension also contains the "level" of the source attribute ".

6) members (Members)
Each level organizes the basic elements of a dimension by hierarchy, that is, "members ". Each member represents a data element in a dimension.

A member is a project in a dimension, indicating that data appears once or multiple times. You can think of members in a dimension as one or more records in the basic database. The value in this column belongs to this category. A member is the lowest reference level used to describe unit data in a multi-dimensional dataset.

7) member function)
Mdx provides many functions that can be used to retrieve members from other MDX entities (such as dimensions and levels. Therefore, it is not always necessary to explicitly reference members. For example, the firstchild function allows you to retrieve all members from a specific dimension or level. To obtain the first child Member of the time dimension, You can explicitly declare the member, as shown in the following example: time. [1st half], you can also use the firstchild function to return the same members, such as time. firstchild

8) measurement value (Measures)
A member of the Measures dimension is called a measurement value ". The metric value indicates the data organized by other dimensions contained in the multidimensional data set.

In A Multidimensional Dataset, a metric value is a group of values. These values are based on a column in a fact data table of A Multidimensional Dataset and are generally numbers. In addition, the measurement value is the center value of the analyzed multi-dimensional dataset. That is, the metric value is the digital data that the end user focuses on when Browsing multi-dimensional data sets. The metric value you selected depends on the type of information requested by the end user. Some common metric values include sales, cost, expenditures, and production count.

9) calculation member (calculated members)
A Calculated member is a member filled by an MDX expression. They are returned like normal members. Mdx provides a reliable function set that can be used to create computing members, providing you with great flexibility in multi-dimensional data operations.

10) Cells)
The data element contained in a cube is called a "unit ". You can specify a member to uniquely identify a unit for each Attribute Hierarchy in A Multidimensional Dataset.

11) tuples)
A combination of attributes that identify a unit is called a "tuples ". For example, the following tuples identify a unit whose value is 240:

(Source. [Eastern hemister]. Africa, time. [2nd half]. [4th quarter], route. Air, measures. packages)

Just as you can specify to retrieve multiple groups of columns or rows from a relational database table, you can specify to retrieve a group of tuples from a Multidimensional Dataset. In MDX, the identifier used to indicate an ordered set of tuples is called "set ". The following example identifies a set of tuples In the Multidimensional Dataset: {(time. [1st half]. [1st quarter]), time. [2nd half]. [3rd quarter])}

For complex MDX statements, Set Identifiers and expressions become long and hard to understand. In addition, many set expressions are reused in different statements. You can create a set with an alias (called a "nameset") to make the MDX query easier to understand.

A tuple identifies a unit in a multi-dimensional dataset. A tuple consists of one member in each hierarchy of A Multidimensional Dataset (explicitly or implicitly referenced ). If the members in a specific level are not explicitly referenced in the tuples, the default members in the hierarchy are implicitly included in the tuples. In MDX, tuples are constructed according to the syntax according to their complexity. The following syntax is acceptable if the tuples are composed of only one member in a hierarchy (usually referred to as "simple tuples:

Time. [2nd half]

If a tuples consist of multiple explicitly referenced members in multiple hierarchies, the members indicated by the tuples must be enclosed in parentheses, as shown in the following example.

(Time. [2nd half], route. nonground. Air)

Tuples composed of one member can also be enclosed in parentheses, but parentheses are not required. Tuples are often grouped into a set for use in mdx queries.

12) tuples Function)
There are some MDX functions that return tuples, which can be used wherever tuples are accepted.

13) Sets)
A set is an ordered set of zero, one, or more tuples. The set is most commonly used to define the query axis and the slice axis in the MDX query. Therefore, there can be only one tuples, and in some cases it can be empty. The following example shows a set with two tuples:

{(Time. [1st half], route. nonground. Air), (time. [2nd half], route. nonground. Sea )}

A set can contain the same tuples multiple times. The following sets are acceptable:

{Time. [2nd half], time. [2nd half]}

A set refers to a combination of group members represented by tuples or the values in the units represented by tuples in a set, depending on the context of the set. In the MDX syntax, tuples are enclosed in braces to construct a set. A set composed of one tuple is not a tuple. Mdx interprets them as sets. Some MDX functions accept tuples as parameters. If a single set of tuples is passed, an error occurs. Tuples and sets composed of individual tuples are not interchangeable.

14) Set Function)
Explicit typing of tuples and including them in braces is not the only way to retrieve a set. Mdx supports multiple return set functions. The colon operator allows you to create a set in the natural sequence of members. For example, the set shown in the following example contains the tuples from the first quarter to the fourth quarter:

{[1st quarter]: [4th quarter]}

If you do not use the colon operator to create a set, you can create the same member set by specifying the following tuples:

{[1st quarter], [2nd quarter], [3rd quarter], [4th quarter]}

The colon operator is included. The generated set contains members on both sides of the colon operator.

The MDX functions of other return sets can be used independently or as part of a comma-separated member list. For example, all the following MDX expressions are valid:

{Time. Children}

{Time. Children, route. nonground. Air}

{Time. Children, route. nonground. Air, source. Children}

15) name set
A nameset is a set for which an alias is created. Naming sets are most commonly used in complex MDX queries to make these queries easier to read and maintain.

16) expression (expressions)
In MDX, an expression is a combination of identifiers, values, functions, and operators. Analysis Services can search for an object, such as a set, a member, or a scalar similar to a string or number.

17) Statement (statements)
An MDX statement is a combination of expressions and keywords. For example, analysis services can execute an operation by running an MDX statement, such as querying a cube or calculating a unit of a subcube. For example, you can use the mdx select statement to retrieve multidimensional data from an analysis services instance.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.