A factless fact table is a fact table that does not have any measures. It is essentially an intersection of dimensions. On the surface, a factless fact table does not make sense, since a fact table is, after all, about facts. However, there are situations where having this kind of relationship makes sense in data warehousing.html
For example, think about a record of student attendance in classes. In this case, the fact table would consist of 3 dimensions: the student dimension, the time dimension, and the class dimension. This factless fact table would look like the following:less
The only measure that you can possibly attach to each combination is "1" to show the presence of that particular combination. However, adding a fact that always shows 1 is redundant because we can simply use the COUNT function in SQL to answer the same questions.flex
Factless fact tables offer the most flexibility in data warehouse design. For example, one can easily answer the following questions with this factless fact table:this
How many students attended a particular class on a particular day?spa
How many classes on average does a student attend on a given day?翻譯
Without using a factless fact table, we will need two separate fact tables to answer the above two questions. With the above factless fact table, it becomes the only fact table that's needed.orm
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
htm
如下內容轉自 http://www.cnblogs.com/lijun4017/archive/2010/08/04/1792293.html blog
淺析非事實型事實表事件
在維度建模的數據倉庫中,有一種事實表叫Factless Fact Table,中文通常翻譯爲「非事實型事實表」。在事實表中,一般會保存十個左右的維度外鍵和多個度量事實,度量事實是事實表的關鍵所在。在非事實型事實表中沒有這些度量事實,只有多個維度外鍵。非事實型事實表一般用來跟蹤一些事件或者說明某些活動的範圍。下面舉例來進行說明。
第一類非事實型事實表是用來跟蹤事件的事實表。例如:學生註冊事件,學校須要對學生按學期進行跟蹤。維度表包括學期維度、課程維度、系維度、學生維度、註冊專業維度和取得學分維度,而事實表是由這些維度的主鍵組成,事實只有註冊數,而且恆爲1。這樣的事實表能夠回答大量關於大學開課註冊方面的問題,主要是回答各類狀況下的註冊數。
第二類非事實型事實表是用來講明某些活動範圍的事實表。例如:促銷範圍事實表。一般銷售事實表能夠回答如促銷商品的銷售狀況,可是對於那些沒有銷售出去的促銷商品無法回答。這時,經過創建促銷範圍事實表,將商場須要促銷的商品單獨創建事實表保存。而後,經過這個促銷範圍事實表和銷售事實表便可得出哪些促銷商品沒有銷售出去。這樣的促銷範圍事實表只是用來講明促銷活動的範圍,其中沒有任何事實度量。
如下內容轉自 http://www.cnblogs.com/lijun4017/archive/2010/08/04/1792440.html
咱們用非事實型事實表來記錄維度之間的多對多關係,可是關係上沒有數字或者文本的事實。非事實型事實表通常用來記錄事件或者範圍信息。常見的例子如:標識產品的促銷範圍;記錄學生出席或者註冊事件等。
在本TIP中咱們用非事實型事實表來補充緩慢變化維的處理策略。
對於一個大型的B2C企業來講,會有上千萬的客戶。對於這種大型的客戶表,須要跟蹤客戶的變化狀況,咱們能夠採用TYPE 2的緩慢變化維策略來進行應對。例如,一個大的客戶表,咱們儘可能減少TYPE 2生成的記錄數,創建了四個微型維度,分別是客戶信用屬性、客戶參數、市場傾向和客戶詳細地址。這樣在交易粒度事實表中咱們會保留客戶相關信息的五個外鍵,這些外鍵關聯到客戶不一樣的信息。
同時,咱們還應該支持客戶的總體信息的訪問。爲了能方便訪問客戶的總體信息,咱們能夠創建另外一個週期快照事實表,天天加載客戶維度和其相關聯的微型維度的關係。可是這樣就須要天天保存上千萬記錄的快照,不是一個好的選擇。
這時,咱們能夠考慮創建非事實型事實表來解決這個問題。咱們能夠創建一個事實表,其中只有客戶維度和其對應微型維度的外鍵,當客戶有TYPE 2變化時或者產生新的微型維度記錄時,咱們能夠在這個事實表中插入一條記錄。在這個事實表中還能夠加入生效日期和失效日期,能夠加一列用來標識是當前客戶信息記錄,能夠加變化緣由列