In the previous tutorial, we saw how to build cubes based on fact tables and dimension tables, and how to associate fact tables with dimension tables. This is the most common ing, that is, star schema.
However, a dimension can be connected to a fact table based on more than one table by defining a well-defined path. This dimension is called Snowflake and uses Operator definition, for example:
Cube name = "sales"> ... Dimension name = "product" foreignkey = "product_id"> Hierarchy hasall = "true" primarykey = "product_id" primarykeytable = "product"> Join leftkey = "product_class_key" rightalias = "product_class" rightkey = "product_class_id"> Table name = "product"/> Join leftkey = "product_type_id" rightkey = "product_type_id"> Table name = "product_class"/> Table name = "product_type"/> Join> Join> Hierarchy> Dimension> Cube> |
In the preceding example, the "product" dimension consists of three tables. The fact table connects to the "product" table through the foreign key "product_id" and connects to the product category through the foreign key "product_class_id, connect to product_type through "product_type_id. We need Element nesting.
It seems that the arrangement of tables is complex, but in fact, the data volume can be reduced through the Association of product tables.