Patent ID: 8868544

Claim:
A computer-implemented method comprising: storing multidimensional data in a relational database, wherein the multidimensional data that is stored in the relational database includes a plurality of dimensions, and wherein at least one dimension of the plurality of dimensions includes a hierarchy having two or more levels of granularity; receiving a particular query that requests to retrieve multi-dimensional data from the relational database via a certain view referred to by a reference within said particular query, said particular query conforming to a database language supported by a relational database system; wherein a partial materialized view includes a portion of said multidimensional data aggregated at one or more particular levels of granularity of said hierarchy; wherein said particular query requests data aggregated at a number of levels of granularity of: said hierarchy, and another dimension different than the dimension of said hierarchy; and rewriting said particular query to translate said certain view into a view defined by an inner subquery that returns data aggregated at said number of levels of granularity, and rewriting said inner subquery; and wherein (1) said rewriting said particular query to translate said certain view into a view defined by an inner subquery that returns and (2) said rewriting said inner subquery both do not involve rewriting said particular query to access said partial materialized view; after rewriting said inner subquery, rewriting said particular query to access said partial materialized view; and wherein the method is performed by one or more computers.