Boolean dimensions

View previous topic View next topic Go down

Boolean dimensions

Post  simmo2013 on Tue Nov 05, 2013 4:30 am

Hi there!

Quick question when I have a simple yes/no dimension for example is my product on sale or not what is best pratice to model this?

Thanks

Simmo

simmo2013

Posts : 6
Join date : 2013-11-05

View user profile

Back to top Go down

Re: Boolean dimensions

Post  BoxesAndLines on Tue Nov 05, 2013 10:01 am

Make it the smallest numeric datatype that is still summable. I typically add these to the fact table since folks want to count them.
avatar
BoxesAndLines

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

View user profile

Back to top Go down

Re: Boolean dimensions

Post  ngalemmo on Tue Nov 05, 2013 1:45 pm

And it you have a lot of them, you can collect them in a junk dimension.
avatar
ngalemmo

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

View user profile http://aginity.com

Back to top Go down

Re: Boolean dimensions

Post  simmo2013 on Tue Nov 05, 2013 2:24 pm

Thanks for the responses. What is best in terms of performance: degenerate dims for say 3 y/n fields in the fact table or a junk dimension?

My fact table will have around 325 million transactions for about 30 million unique orders...

simmo2013

Posts : 6
Join date : 2013-11-05

View user profile

Back to top Go down

Re: Boolean dimensions

Post  ngalemmo on Tue Nov 05, 2013 4:40 pm

Its probably a wash. Given its only 3 flags, I would leave them on the fact.
avatar
ngalemmo

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

View user profile http://aginity.com

Back to top Go down

Re: Boolean dimensions

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


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