1 Fact or 2, that is the question
4 posters
Page 1 of 1
1 Fact or 2, that is the question
Got a dilemma, scratching my head here over whether to make 1 or 2 fact tables. I keep going back and forth, so thought I'd go after your expert opinions.
Here are the basics...
Industry: Casino Gaming
Dimensions include CUSTOMER, GAME, CALENDAR, etc.
Topic of discussion is the "Gaming Activity" Fact table, which is split into 2 main categories: Slot machine play and Table Game play. Both have overlapping data: "Win/Loss", "Amount Played", "Average Bet", "Time Played" etc. but there are other fields that exist in only one group, such as "Credit Played" only applies to Table Games and "Handle Pulls" only applies to Slot Machine play.
So, do I build 2 Fact tables or 1? When I decide on one way, I quickly switch to the other option so I'm going in circles. I can make a case for both options.
Any suggestions? Thoughts? Comments? Recommendations?
Thanks in advance!
Here are the basics...
Industry: Casino Gaming
Dimensions include CUSTOMER, GAME, CALENDAR, etc.
Topic of discussion is the "Gaming Activity" Fact table, which is split into 2 main categories: Slot machine play and Table Game play. Both have overlapping data: "Win/Loss", "Amount Played", "Average Bet", "Time Played" etc. but there are other fields that exist in only one group, such as "Credit Played" only applies to Table Games and "Handle Pulls" only applies to Slot Machine play.
So, do I build 2 Fact tables or 1? When I decide on one way, I quickly switch to the other option so I'm going in circles. I can make a case for both options.
Any suggestions? Thoughts? Comments? Recommendations?
Thanks in advance!
wonka- Posts : 13
Join date : 2011-08-10
Re: 1 Fact or 2, that is the question
I would go with 1. What is more important? Easily obtaining a full picture of a customer's action or saving disk space?
Re: 1 Fact or 2, that is the question
If those are the only differences, I would go with one as well. The problem you will have (or users will have) is understanding which dimensions apply to which metrics. The dimensional data model offers no support here. If you have a BI tool then you should be able to manage these relationships. If not, you can implement views for each type to prevent folks from mixing dimensions that aren't applicable for a given metric.
BoxesAndLines- Posts : 1212
Join date : 2009-02-03
Location : USA
Re: 1 Fact or 2, that is the question
This is the super-type/sub-type design pattern.
three or more tables:
one to hold the facts that are common to across all types of gaming.
one to hold all the facts that are applicable to table games.
one to hold all the facts that are applicable to slots.
...
one to hold all the facts related to sports betting, etc.....
You duplicate the facts across the tables, so "Win/Loss", "Amount Played", "Average Bet", "Time Played" would be in all three tables.
If you had a very large number of disjoint metrics, multiple physical tables would make sense, otherwise 1 table plus some views.
Good "Luck"
three or more tables:
one to hold the facts that are common to across all types of gaming.
one to hold all the facts that are applicable to table games.
one to hold all the facts that are applicable to slots.
...
one to hold all the facts related to sports betting, etc.....
You duplicate the facts across the tables, so "Win/Loss", "Amount Played", "Average Bet", "Time Played" would be in all three tables.
If you had a very large number of disjoint metrics, multiple physical tables would make sense, otherwise 1 table plus some views.
Good "Luck"
jgranden- Posts : 6
Join date : 2010-07-09
Similar topics
» FACT Design Question - How to design FACT Table when computation is required on the degenerate dimension?
» Modelling question - Multiple fact tables with one to many relationships and querying from many fact tables
» Fact Normalisation Question
» Another "two fact tables" question
» New to DW and question about fact table
» Modelling question - Multiple fact tables with one to many relationships and querying from many fact tables
» Fact Normalisation Question
» Another "two fact tables" question
» New to DW and question about fact table
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum