维度建模创建/修改日期/人员

时间:2016-07-26 19:24:39

标签: dimensional-modeling

将Created By,Created Timestamp,Modified By,Modified Timestamp包含到维度模型中的最佳做法是什么?

前两个永远不会改变。最后两个对于某些数据元素会缓慢变化,但对于其他数据元素则会很快变化。但是,我更喜欢一致的方法,以便报告用户熟悉它。

假设我真的只关心最近的价值;我不需要历史。

最好将它们放入维度,因为对于高度修改的数据,该维度会经常发生变化吗?或者,将它们放入事实表中是否更好,处理不变的创建信息的方式与销售订单号变为退化维度的方式大致相同?

1 个答案:

答案 0 :(得分:1)

In my answer I will assume that these ADDITIONAL Columns do NOT define the validity of the Dimensional record and that you are talking about a Slowly Changing Dimension type 1

So we are in fact talking about dimensional metadata here, about who / which process created or modified the dimensional row.

I would always put this kind of metadata in the dimension because it:

  • Is related to changes in the dimension. These changes happen independent of the fact table
  • In general it is advised to keep Fact tables as small as possible. If your Fact table would contain 5 Dimensions, this would lead to adding 5*4=20 extra columns to your fact table which will seriously bloath it and impact performance.