A cube's structure is defined by its measures and dimensions. They are derived from tables in the cube's data source. The set of tables from which a cube's measures and dimensions are derived is called the cube's schema. Every cube schema consists of a single fact table and one or more dimension tables. The cube's measures are derived from columns in the fact table. The cube's dimensions are derived from columns in the dimension tables.
For example, a cube has the following schema.
The cube's measures and dimension levels are derived from the following columns.
|Measure or level|| |
|Source column||Sample column value|
|Packages measure||Not applicable||Imports_ |
|Last measure||Not applicable||Imports_ |
|Route Category level in Route dimension||nonground, |
|Route level in Route dimension||air, |
|Hemisphere level in Source dimension||Eastern Hemisphere, |
|Continent level in Source dimension||Africa, |
|Half level in Time dimension||1st half, |
|Quarter level in Time dimension||1st quarter, |
A single cube cell is usually derived from multiple rows in the fact table. For example, the cell in the Imports cube for the air member, the Africa member, and the 1st quarter member is derived from the following rows in the Imports_Fact_Table.
In the preceding table, the fact that each row has the same values for Route_ID, Source_ID, and Time_ID indicates that these rows contribute to the same cube cell.
There are two common types of cube schemas: star and snowflake. In a star schema, each dimension table joins to the fact table. The Imports cube schema shown earlier in this topic is a star schema. In a snowflake schema, one or more dimension tables join to another dimension table rather than to the fact table. The dimension tables that do not join to the fact table are for dimensions with multiple dimension tables. For example, the administrator of the Imports cube wants to expand the cube to multiple years. To accomplish this, the administrator adds a Year_ID column to the Time_Dimension_Table, the Time_Dimension_Table_2 to the cube's schema, and a Year level to the Time dimension. (The Year level is based on the Time_Dimension_Table_2.Year column.) After these changes are made, the Time dimension is based on two dimension tables, and the cube's schema is snowflake, as shown in the following illustration.
After you change a cube's structure, usually you must process the cube with the Full process option so that changes can be seen by end users. For more information, see Processing Cubes.