What dw model is appropriate when there's no measure?

假装没事ソ 提交于 2020-01-06 18:38:08

问题


All the demos out there use a sales/order model as a measure in their examples. But my db is not transactional. It's a customer-centric model where there is one table for the customer which is joined to several attribute tables.

Does this not even qualify for cube building because of the different model, or is there some way to still build cubes despite it not being transactional?

I've heard of factless fact tables but don't really understand the concept yet. Is this where you would use one?


回答1:


What kind of metrics are you going to analyze?

If all you want to do is aggregate the number of customers that have a particular attribute, you could get away with a fact table like this:

Customer_FK, Attribute_FK

I prefer using an extra column with a fixed value of "1" to make aggregation simpler

Customer_FK, Attribute_FK, Attribute_count
    1000,      23,             1
    1001,      23,             1

This way you can use a simple sum aggregation on the third column to find out that you have 2 customers with attribute #23.

I am assuming you would use a single (flat) attribute dimension table and populate it with the several attribute tables from your customer-centric db.

http://www.kimballgroup.com/1996/09/02/factless-fact-tables/




回答2:


The best reading you can get for that kind of question is from Kimball : http://www.kimballgroup.com/2008/11/05/fact-tables/



来源:https://stackoverflow.com/questions/14967534/what-dw-model-is-appropriate-when-theres-no-measure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!