Database Reference
In-Depth Information
< MeasureGroups >
13
< MeasureGroup name= ' Sales ' table= ' Sales ' >
14
< Measures >
15
...
16
< /Measures >
17
< DimensionLinks >
18
...
19
< /DimensionLinks >
20
< /MeasureGroup >
21
< /MeasureGroups >
22
< /Cube >
23
< /Schema >
24
The Schema element (starting in line 1) defines all other elements in the
schema. The PhysicalSchema element (lines 3-5) defines the tables that are
the source data for the dimensions and cubes, and the foreign key links
between these tables. The Dimension element (lines 6-8) defines the shared
dimension Time , which is used several times in the Northwind cube for
the role-playing dimensions OrderDate , DueDate ,and ShippingDate . Shared
dimensions can also be used in several cubes. The Cube element (lines 9-23)
defines the Sales cube. A cube schema contains dimensions and measures,
the latter organized in measure groups. The Dimensions element (lines 10-
12) defines the dimensions of the cube. The measure groups are defined
using the element MeasureGroups (lines 13-22). The measure group Sales
(lines 14-21) defines the measures using the Measures element (lines 15-17).
The DimensionLinks element (lines 18-20) defines how measures relate to
dimensions. We detail next each of the elements introduced above.
5.10.1 Schemas and Physical Schemas
The Schema element is the topmost element of a cube schema. It is the
container for all its schema elements. A schema has a name and may have
other attributes such as description and the version of Mondrian in which it
is written. A schema always includes a PhysicalSchema element and one or
more Cube elements. Other common elements are Dimension (to define shared
dimensions) and Role for access control.
The PhysicalSchema element defines the physical schema ,whichstates
the tables and columns in the database that provide data for the dimensions
and cubes in the data warehouse. The physical schema isolates the logical data
warehouse schema from the underlying database. For example, a dimension
can be based upon a table that can be a real table or an SQL query in the
database. Similarly, a measure can be based upon a column that can be a
Search WWH ::




Custom Search