Mondrian is an OLAP server implemented in Java.


mondrian.calc Provides compiled expressions.
mondrian.calc.impl Provides implementation classes for compiled expressions.
mondrian.gui Contains a workbench written in Swing for designing Mondrian schemas.
mondrian.i18n Utilities for internationalization and localization.
mondrian.mdx Defines a parse tree for MDX expressions.
mondrian.olap Mondrian's core package, this defines connections and the catalog metamodel, and allows you to execute queries. Defines the set of MDX built-in functions. Defines MDX extension functions. Implements the set of functions defined by the Visual Basic for Applications (VBA) specification.
mondrian.olap.type Type system for MDX expessions.
mondrian.olap4j olap4j driver for the Mondrian OLAP engine.
mondrian.recorder Provides a set a classes for logging the process of a task.
mondrian.rolap Implements the data access layer for the olap package.
mondrian.rolap.agg Manages a cache of aggregates containing cell values.
mondrian.rolap.aggmatcher Defines a 'matcher' which scans the schema to find candidate aggregate tables.
mondrian.rolap.cache Provides primitives for policy-based caching.
mondrian.rolap.sql Database-independent library for generating SQL.
mondrian.spi Contains the server-provider interfaces (SPIs) which user-defined extensions to Mondrian should implement.
mondrian.spi.impl Provides implementations of SPIs defined in the mondrian.spi package.
mondrian.test Suite of regression tests. Regression tests relating to the build process.
mondrian.test.comp Utilities for comparison-based testing.
mondrian.test.loader Utilities to load test data. Text user interface for Mondrian.
mondrian.util Mondrian utilities.
mondrian.web.taglib Provides a tag library for embedding MDX queries in JSP pages.
mondrian.xmla Implements the XML for Analysis API.


Mondrian is an OLAP server implemented in Java.


See architecture.


Query transformer

See Parser.


It is represented as an XML file. The metadata is loaded into memory the first time you reference a dimensional model. You can modify the model at runtime by creating instances of classes such as RolapHierarchy.

Calculation layer

todo: See Query and Result.

todo: The package mondrian.rolap. is the one and only implementation of the API. The DriverManager (class DriverManager) acts as class-factory.

todo: How members are calculated...

todo: How aggregations are batched...

todo: MDX functions. See user-defined functions.

Aggregation manager

Aggregations are based upon the relational model: as far as the aggregation manager is concerned, there is no relationship between the columns city and state. This means that all roll-ups are the same: you just drop a column. Consider the 3 roll-ups possible by dropping a column from the aggregation {gender, city, state}: dropping gender is equivalent to removing the [Gender] dimension; dropping city is equivalent to rolling up to a higher level in the [Geography] hierarchy; and dropping state is not even allowed in the dimensional model (no, sorry, you can't ask about products sold in a cities called 'Portland'). This approach will also allow us to implement 'drill anywhere'.

An aggregation is defined by a search condition, for example, {state in ('CA', 'OR', 'WA'), city = any, gender = 'M', measure = 'Unit sales'}. The any value is important; if we had asked for a specific set of cities, we would not later be able to roll-up by dropping the city column.

The caching strategy is to throw out the aggregation with the lowest cost/benefit ratio. The 'benefit' of an item is the effort it took to produce (effort which it is saving future queries) multiplied by its 'usefulness' which declines exponentially if it is not used over time. The 'cost' of an item is its size.

$Id: //open/mondrian-release/3.2/src/main/overview.html#1 $ (log)

Get Mondrian at Fast, secure and free Open Source software downloads