Sunday, August 12, 2018

What is fact table in data warehouse

In data warehousing, a fact table consists of measurable entities of any business. It is surrounded by multiple dimensions in a star or snowflake schema.
In ideal scenario it has 2 types of columns:

  • Foreign Keys to the related dimension
  • Measurable columns like price etc.
It usually provides the calculative values(count, sum etc) which could be analysed across different dimensions. It is important to define the grain of each fact to the lowest level of reporting needs.


If we consider the Data-warehouse scenario of Online Ticket Booking, The first fact that comes to mind is for tickets.
So, if at any point of time business needs to find out how many tickets were sold for each cinema, they could simply join Fact_Tickets with Dim_Cinemas table as detailed in below image.
Fact



This suggests that 2 tickets were sold in cinema C1 and 1 ticket was sold for cinems C2

2 comments:


  1. Very good article . Thanks for sharing.
    Snowflake Training
    Snowflake Training in Hyderabad
    Snowflake Online Training
    Snowflake Online Training Hyderabad
    Snowflake Training Online
    Snowflake Training in Ameerpet
    Snowflake Training Institute in Hyderabad

    ReplyDelete

If you liked the post, please share it.
Subscribe to your email and receive new articles on your email