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.

时间: 2024-11-04 11:58:00

Snowflake weakness and type2 fact table的相关文章

Oracle之数组

[Oracle整理]Oracle之数组 说明:本内容是工作用到的知识点整理,来自工作中和网络. 代码于Oracle9上测试. Oracle数组一般可以分为固定数组和可变数组 集合:是具有相同定义的元素的聚合.Oracle有两种类型的集合: 可变长数组(VARRAY):可以有任意数量的元素,但必须预先定义限制值. 嵌套表:视为表中之表,可以有任意数量的元素,不需要预先定义限制值. 在PL/SQL中是没有数组(Array)概念的.但是如果程序员想用Array的话,就得变通一下,用TYPE   和Ta

【C#公共帮助类】 Convert帮助类

大家知道,开发项目除了数据访问层很重要外,就是Common了,这里就提供了强大且实用的工具. [C#公共帮助类] Image帮助类 一.DataTable using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data; using System.Reflection; using System.Collections; namespace Common

Table Properties [AX 2012]

Table Properties [AX 2012] 1 out of 2 rated this helpful - Rate this topic Updated: July 20, 2012 Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012 This topic describes the properties that

DDL中drop-alter table

一.DROP TABLE语句:用于删除数据表 DROP TABLE removes one or more tables. You must have the DROP privilege for each table. All table data and the table definition are removed, so be careful with this statement! 基本格式: drop table <table_name> DROP [TEMPORARY] TAB

【ORACLE】DUMP转储 redo log , undo段及table段

1.1 使用oradebug --启动任务 oradebug setmypid --设置dump文件的名称标示 alter session set tracefile_identifier=undo --查看dump文件 SQL> oradebug tracefile_name; c:\opt\oracle\product\10.2.0\admin\rundb\udump\rundb_ora_6660_pra1.trc --设置权限 oradebug unlimit --查看可以转储的列表: S

(转)适用微信小程序的table表格(带隔行变色)

原文地址 table.wxml <view class="table"> <view class="tr bg-w"> <view class="th">head1</view> <view class="th">head2</view> <view class="th ">head3</view> </v

POJ 3349 - Snowflake Snow Snowflakes - [hash]

题目链接:http://poj.org/problem?id=3349 Time Limit: 4000MS Memory Limit: 65536K Description You may have heard that no two snowflakes are alike. Your task is to write a program to determine whether this is really true. Your program will read information

现在主流网站为什么都用div+css布局而不是用table

由于刚刚接触前端,一直觉得table布局在代码上看起来比div+css更整洁,div+css布局的页面,一堆的<div><div><div>...</div></div></div>看起来都让人犯密集恐惧症,那么为什么现在的主流网站还都乐此不疲呢?为什么div+css反而成了一种主流布局方式呢?一直对此不解.这篇文章好像是解决了我的问题,先摘录过来,以便查阅. 以下内容摘自:http://www.divcss5.com/wenji/w

&lt;table&gt;标签总结(colspan跨列 ,rowspan跨行)

table标签有些内置属性要设置: <table cellpadding="0" cellspacing="0" border="0" summary="各银行的网上银行支付限额总表"> 1.摘要summary的内容是不会在浏览器中显示出来的.它的作用是增加表格的可读性(语义化), 使搜索引擎更好的读懂表格内容,还可以使屏幕阅读器更好的帮助特殊用户读取表格内容. 2.