Factless Fact
A factless fact table is a table that contains nothing but dimensional keys.
A factless fact table is a table that contains nothing but dimensional keys.
There are two kinds of factless fact tables:
- Factless fact table describes event
- Factless fact table describes condition.
Factless
fact table for event
You often find that you want to track events or
activities that occurs in your business process but you can’t find measures to
track. In these situations, you can create a transaction-grained fact
table that has no facts to describe that events or activities.
Example
For example, you may want to track employee
leaves.
At the center of diagram below is the
FACT_LEAVE table that has no facts at all. However the FACT_LEAVE table is used
to measure employee leave event when it occurs.
The following SQL statement is used to count
number of leaves that and employee has been taken:
Select employee_name as
name,count(leave-type_id) as leave from fact_leave ,Dim_employee where
fact_leave.employee_id = Dim_employee.employee_id.
Factless
fact table for condition:
It is used to support negative analysis report,
Factless fact table can be also used in these situations:
For example a store that did not
sell product for a given period, to make this report you must have a fact table
to capture all combinations:
No comments:
Post a Comment