Patent ID: 7031953

Claim:
A method of executing a metric query for a relational database, the relational database having fact tables, dimension tables, and metadata describing the relationships between the fact and dimension tables, wherein the fact tables include measures which can be additive or non-additive, and wherein the metadata includes a designation specifying by dimension which measures are additive and which measures are non-additive, the method comprising: receiving the metric query from a client; determining which hierarchical levels of the fact and dimension tables are available in the relational database for responding to the metric query; determining at least one database query according to the available hierarchical levels of the fact and dimension tables; retrieving data corresponding to the at least one database query from the relational database; and responding to the metric query based on the data retrieved, whereby the response is tailored to the most efficient hierarchical level necessary depending on whether the measures of the requested metric are additive.