Method and apparatus for optimizing query generation by selectively utilizing attributes or key values
AssigneePlatinum Technology, Inc.
InventorPiotr Jacek Krychniak
Life of this patent
Estimating the term…
Abstract
A method of joining two or more sets of data in a database is provided wherein certain dimensions in the fact data are designated as being forced dimensions, and wherein for each forced dimension, a set of entries is created in the fact data each with the same key values in all of the dimensions other than the forced dimension, and each with a different member of the set of values existing in the fact data for that dimension, if and only if at least one entry exists in the fact data with the same set of key values in the dimensions other than the forced dimension.
Claims6
A method of generating a query to be used to obtain data from a database, said database comprising fact tables and at least one dimension table, each dimension table providing data representing a dimension, said data comprising attribute values in a set of attributes for a set of entities, each entity being identified by a key value, said fact tables comprising data entries, each data entry being associated with an entity from each of said dimensions;
- said query being based on a request for data specifying one or more of said attribute values from one or more of said dimensions;
- for each dimension, said method comprising the steps of:
- establishing all the key values in said dimension associated with said specified attribute values in said dimension;
- selecting whether to query on key value or attribute value in that dimension as a function of the number of said established key values and the number of said specified attribute values in said dimension;
- generating the parts of said query corresponding to that dimension using attribute values if an attribute query is selected;
- and
- generating the parts of said query corresponding to that dimension using key values if a key value is selected.
Apparatus for generating a query to obtain data from a database, said database comprising fact tables and at least one dimension table, each dimension table providing data representing a dimension, said data comprising attribute values in a set of attributes for a set of entities, each entity being identified by a key value, said fact tables comprising data entries, each data entry being associated with an entity from each of said dimensions;
- said query being based on a request for data specifying one or more of said attribute values from one or more of said dimensions;
- said apparatus comprising:
- means for establishing all the key values in each dimension associated with said specified attribute values in said dimension;
- means for selecting whether to query on key value or attribute value in that dimension as a function of the number of said established key values and the number of said specified attribute values in said dimension;
- means for generating the parts of said query corresponding to that dimension using attribute values if an attribute value query is selected;
- and
- means for generating the parts of said query corresponding to that dimension using key values if a key value query is selected.
Dependencies are inferred from the claim text.