Friday, 1 April 2016

Understanding with Factless Fact Table

When we think about a Fact table in dimension model, it has some foreign key, combining all foreign key make the Primary key and of course Fact columns (Numeric in nature where we can Use Aggregate function).
Now what is Factless Fact Table
The name tells everything. It is a fact table without Fact columns.
Yes I am right the fact table contains foreign key, Combining Foreign key makes Primary Key and NO FACT Columns.
Use of FactLess Fact Table
So you can ask me what the use of such kind of Fact table where there is No Fact Exists. Yes, it is also required in data model but depends on situation to situation.
Now I am going to make a situation where we can understand the use of Fact Less Fact table.
In the bellow figure I am going to lay down a data model.

If we provide such query
SELECT customer_name,
FROM Fact_Conatct
JOIN ...

Here fact table take a records every time when the Customer make any contact, so counting the “ConatctType” key we can understand the fact easily without storing it.

Hope you like it.

Posted by: MR. JOYDEEP DAS

1 comment: