Mondrian series (6)-star and snowflake models (1)-Overview

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.