[Mondrian] Proposed additions to Mondrian schema syntax

Julian Hyde jhyde at pentaho.com
Fri Jun 19 14:42:34 EDT 2009

> Any suggestions on how to create unit tests for these?  I'm 
> wondering  
> if I need to go so far as to add a new data set comparable to 
> FoodMart  
> and SteelWheels, since neither of those fit the constraints.

I think you can use the FoodMart data set just fine, as long as you build
new dimensions, and don't use the columns for the purposes for which they
were intended. For example, if you build the levels upside down you'll get
all kinds of functional dependency violations.

> The first is the case where some or all of a level's properties are
> functionally dependent on the level itself.

This is already the case in the FoodMart schema, but all of the properties
occur at the lowest level of the hierarchy, so it is trivially true. E.g.
the "Meat Sqft" property is functionally dependent on the "Store Name"
level's key, but that's trivial because there is only one record

So, to test this, you need to manufacture some properties at non-leaf
levels. Maybe make a Store dimension that only has Country, City, Store Name
levels and make State a property of the City level.

> The second case is the one in which all properties are functionally
> dependent on their levels, and there is some set of level columns
> which, taken together, uniquely identify every row in the
> table (i.e.
> they effectively comprise an alternate unique key).

The time_by_day table has alternate keys (the_month vs. month_of_year).


More information about the Mondrian mailing list