System and method for expressing and calculating a relationship between measures
AssigneeMicrosoft Corporation
InventorsRichard Tkachuk, Cristian Petculescu, Amir Netz
Life of this patent
Estimating the term…
Abstract
A measure expression may include a relationship between measures defined by an arithmetic operation. A query may request a calculation of the measure expression over a selected range of attributes. The request may be processed by retrieving all rows comprising data within the selected range of attributes for each measure in the expression through a single access to an associated table.
Claims15
A method for calculating a measure expression over a selected range of attributes, the measure expression including a relationship between a first measure and a second measure, the first measure corresponding to a first data type and the second measure corresponding to a second data type, the relationship defined by an arithmetic operation, the method comprising:
- receiving a request to calculate the measure expression over the selected range of attributes;
- responsive to receiving the request, querying a data store to retrieve a first data set corresponding to the first data type, the first data set including only data for the first measure over the selected range of attributes;
- storing the first data set in a first cache;
- generating a first index from the first cache, the first index including data for the first measure over the selected range of attributes common to the first data type and the second data type;
- responsive to receiving the request, querying the data store to retrieve a second data set corresponding to the second data type, the second data set including only data for the second measure over the selected range of attributes;
- storing the second data set in a second cache;
- generating a second index from the second cache, the second index including data for the second measure over the selected range of attributes common to the first data type and the second data type;
- performing the arithmetic operation on the data for the first measure from the first index and the data for the second measure from the second index to achieve resulting data;
- and
- aggregating the resulting data over the selected range of attributes common to the first data type and the second data type.
A system for calculating a measure expression over a selected range of attributes, the measure expression including a relationship between a first measure and a second measure, the first measure corresponding to a first data type and the second measure corresponding to a second data type, the relationship defined by an arithmetic operation, the system comprising:
- a data store for storing a first data table including data for the first data type and a second data table including data for the second data type;
- a processor for performing the following steps:
- receiving a request to calculate the measure expression over the selected range of attributes;
- responsive to receiving the request, querying the data store to retrieve a first data set corresponding to the first data type, the first data set including only data for the first measure over the selected range of attributes;
- storing the first data set in a first cache;
- generating a first index from the first cache, the first index including data for the first measure over the selected range of attributes common to the first data type and the second data type;
- responsive to receiving the request, querying the data store to retrieve the second data set corresponding to the second data type, the second data set including only data for the second measure over the selected range of attributes;
- storing the second data set in a second cache;
- generating a second index from the second cache, the second index including data for the second measure over the selected range of attributes common to the first data type and the second data type;
- performing the arithmetic operation on the data for the first measure from the first index and the data for the second measure from the second index to achieve resulting data;
- and
- aggregating the resulting data over the selected range of attributes common to the first data type and the second data type.
A computer readable medium for calculating a measure expression over a selected range of attributes, the measure expression including a relationship between a first measure and a second measure, the first measure corresponding to a first data type and the second measure corresponding to a second data type, the relationship defined by an arithmetic operation, the computer readable medium having stored thereon computer executable instructions for performing the following steps:
- receiving a request to calculate the measure expression over the selected range of attributes;
- responsive to receiving the request, querying a data store to retrieve a first data set corresponding to the first data type, the first data set including data for the first measure over the selected range of attributes;
- storing the first data set in a first cachet;
- generating a first index from the first cache, the first index including data for the first measure over the selected range of attributes common to the first data type and the second data type;
- responsive to receiving the request, querying the data store to retrieve a second data set corresponding to the second data type, the second data set including data for the second measure over the selected range of attributes;
- storing the second data set in a second cache;
- generating a second index from the second cache, the second index including data for the second measure over the selected range of attributes common to the first data type and the second data type;
- performing the arithmetic operation on the data for the first measure from the first index and the data for the second measure from the second index to achieve resulting data;
- and
- aggregating the resulting data over the selected range of attributes common to the first data type and the second data type.
Dependencies are inferred from the claim text.