The subject invention pertains to the integration of an object model and a
multidimensional database query language such as MDX. In particular,
multidimensional declarative query language entities can be exposed
through objects in an object model. The object model enables generation
and employment of procedural language functions, routines, or procedures
that interact with multidimensional database data. This effectively
provides an extension for multidimensional query languages. For example,
procedures can be stored and invoked from a declarative language query.
Furthermore, the object model disclosed herein can expose a context
object to enable conditional procedures based on the context of
execution.