1 Fact or 2, that is the question

View previous topic View next topic Go down

1 Fact or 2, that is the question

Post  wonka on Wed Aug 10, 2011 9:58 am

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!

wonka

Posts : 13
Join date : 2011-08-10

View user profile

Back to top Go down

Re: 1 Fact or 2, that is the question

Post  ngalemmo on Wed Aug 10, 2011 10:08 am

I would go with 1. What is more important? Easily obtaining a full picture of a customer's action or saving disk space?
avatar
ngalemmo

Posts : 3000
Join date : 2009-05-15
Location : Los Angeles

View user profile http://aginity.com

Back to top Go down

Re: 1 Fact or 2, that is the question

Post  BoxesAndLines on Wed Aug 10, 2011 11:31 am

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.
avatar
BoxesAndLines

Posts : 1212
Join date : 2009-02-03
Location : USA

View user profile

Back to top Go down

Re: 1 Fact or 2, that is the question

Post  jgranden on Tue Aug 16, 2011 11:47 am

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"

jgranden

Posts : 6
Join date : 2010-07-09

View user profile

Back to top Go down

Re: 1 Fact or 2, that is the question

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum