zoukankan      html  css  js  c++  java
  • Snowflake weakness and type2 fact table

       

    DimProduct

      

    DimSubcategory

      

    Dimcategory

    productpk

      

    subcategorypk

      

    categorypk

    sku

      

    subcategoryName

      

    categoryName

    productName

      

    categorypk

      

      

    subcategorypk

      

      

      

      

    Snow flake schema has one weakness,

    Take the product dimension sample, its has subcategory attribute. If we want to track the subcategory's change,

    Set the subcategory as a type2 dimension. Now the design can not support.

    But how can we fix this issue?

    set the product dimension as type2, and change the subcategory and category information all in this product table.

    Then the snow flake schema turn into a star schema.

       

    This sample is special, because you can see that the subcategory and category has just one attribute in tables,

    If one table 's sub table has more attributes, it is not useful to add all attributes in the parent table.

    So what we can do for this case if we want to keep track the sub tables changes?

    In this case , we should add the unique key columns and sub table primary key in the parent table.

    If your dimension and fact tables are all type2, the customer want to track all the dimension tables' change,

    In you fact table, you capture all the relationships for the dimension tables.

    If you just populate dimension tables' primary key in the fact table, how could you keep the records consecutive?

    You need join back the dimension table and judge whether it change or not?

    Or you should add one dimension table's unique key columns in the fact table?

    Tell me if you have better solution for this.

    Looking for a job working at Home about MSBI
  • 相关阅读:
    转载+自己心得
    分享
    领域驱动设计系列文章汇总
    ABP集合贴
    MVC学习系列——参考
    MVC学习系列——RazorViewEngine扩展
    MVC学习系列——Model验证扩展
    MVC学习系列——HtmlHelper扩展
    MVC学习系列——ModelBinder扩展
    MacBook强制清除gardle缓存
  • 原文地址:https://www.cnblogs.com/huaxiaoyao/p/4249966.html
Copyright © 2011-2022 走看看