A method and mechanism for performing an operation based on
multidimensional data in a relational database. A query is generated that
includes a first set of instructions to select a portion of
multidimensional data for inclusion in a relational cube and a second set
of instructions to group the portion of multidimensional data in the
relational cube using at least two or more levels of granularity of at
least one dimension, thereby causing a relational cube to be generated.
Based on a received request for an operation to be performed, the query
is modified to include a third set of instructions that represent the
requested operation; and the query is submitted to the relational
database engine of the relational database management system. Thereafter,
the operation is performed against the relational cube.