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
  • 相关阅读:
    MySQL时间字段如何自动获取插入时间
    web.xml启动顺序
    如何开启Redis
    Windows下启动Redis命令
    Tomcat无法启动:Server Tomcat v8.5 Server at localhost failed to start
    浏览器报:Uncaught SyntaxError: Unexpected end of input 解决办法
    链表查询,双表及多表
    Spring Boot项目中开启事务支持及使用
    Java Servlet基础整理(一)
    Linux下部署Tomcat
  • 原文地址:https://www.cnblogs.com/huaxiaoyao/p/4249966.html
Copyright © 2011-2022 走看看