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
  • 相关阅读:
    Kafka开启JMX监控
    不用再上官网,自己部署一套ElementUI官方最新文档
    Idea没安装几款好用的插件,怎么风骚的写代码???
    springboot2.x基础教程:动手制作一个starter包
    springboot2.x基础教程:自动装配原理与条件注解
    Java Jar源码反编译工具那家强
    Jmeter 乱码解决方法
    robot frame基础知识--变量
    HTML基础--标签
    yaml模块
  • 原文地址:https://www.cnblogs.com/huaxiaoyao/p/4249966.html
Copyright © 2011-2022 走看看