What Is A FACTLESS FACT TABLE?Where We Use Factless Fact
What Is A FACTLESS FACT TABLE?Where We Use Factless Fact
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.
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:
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.
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:
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.
The above fact is used to capture the leave taken by an employee.Whenever an employee
takes leave a record is created with the dimensions.Using the fact FACT_LEAVE we can
answer many questions like
Number of leaves taken by an employee
The type of leave an employee takes
Details of the employee who took leave
Factless fact tables for Conditions
Factless fact tables are also used to model conditions or other important relationships among
dimensions. In these cases, there are no clear transactions or events.It is used to support
negative analysis report. For example a Store that did not sell a product for a given period.
To produce such report, you need to have a fact table to capture all the possible
combinations. You can then figure out what is missing.
For eg, fact_promo gives the information about the products which have promotions but still
did not sell
Note:
We may have the question that why we cannot include these information in the actual fact
table .The problem is that if we do so then the fact size will increase enormously .
Factless fact table is crucial in many complex business processes. By applying you can
design a dimensional model that has no clear facts to produce more meaningful information
for your business processes. Factless fact table itself can be used to generate the useful
reports.