Search This Blog

Tuesday, July 24, 2012

Star Schema Example

Star Schema as shown in the above design will be having a single fact table and many dimension tables.The fact table as the name implies contains the facts /measures and also the foreign keys of all the dimension tables.
Above we can see the Fact table : Fact_Sales
It contains the Foreign keys such as Date_id which is connecting to Dim_Date Dimension table , Store_id which is connecting to Dim_Store dimension table and the Product_id which is connecting with the Dim_product dimension table.
Apart from them it has one more field called Units_sold which is having the Sum of the units based on whichever Dimension we join.
So , If we want the units sold based on the Product name then by joining the Dim_Product and Fact_Sales we will get the Sales of units based on that particular Product.
By Joining Dim_Date and Fact_Sales we can get the Number of units sold in a particular time.

No comments:

Post a Comment

Please Give Your Comments!!

Note: Only a member of this blog may post a comment.