Schema XML Definition
Schema and cube XML definitions represent a more powerful and detailed way of creating a cube. More powerful and detailed then the factories described in the previous chapter.
Working examples are available within the icCube cubes directory. For example, the cubes 'Sales' within both the schema 'Sales (Mixed - XML Definition)' and the schema 'Sales (MSSQL - XML Definition)' are defined using such an XML definition file.
XML definition first contains some quick information about the schema being created (e.g. name, description). Then, the data sources being used are defined for each cube. There is no limit to the number of data sources for any a given cube, several are already available (e.g. file, database and Excel sheets). For each of these data sources, we are defining the tables we are going to use. These tables do not need to represent physical tables (as in a database). They are logical entities defining a tabular view of the data available within the data source.
With all those definitions, we are now ready to define dimensions and facts for our cube. Dimensions are a set of hierarchies that, in turn, are made of an ordered collection of levels. You can look at the working examples to get an idea of the available XML attributes and elements required to define those MDX entities. Eventually, the level definitions reference data as defined in our data tables within our data sources.
The last part of the file consists of facts definitions. Very similar to the dimension definitions, we first define the content of our [Measures] dimensions and then some sort of foreign keys (i.e. links) towards the terminal (i.e. indexing) members of the dimensions.
Next chapter: XML Schema Definition: Mixed (File + Excel) shows how to create a cube from several types of data sources.