Should this be a degenerate dimension or a junk dimension?

View previous topic View next topic Go down

Should this be a degenerate dimension or a junk dimension?

Post  SnowShine429 on Thu Jul 10, 2014 12:11 am

hi all -

we have a transaction table called disbursements and am creating a fact table off of this table. Most of the columns in this table are either keys to dimensions or measures which is good.

However, there are three columns that are texts:
- void indicator (Boolean)
- expense indicator (Boolean)
- Key off code (this is used to tie a disbursement with a purchase)

Should I put them in the fact table(degenerate dimension) or create a junk dimension(one for each indicator)? I am not sure how to deal with key off code.

Thanks in advance for helping out.

SnowShine429

Posts : 36
Join date : 2013-02-16

View user profile

Back to top Go down

Re: Should this be a degenerate dimension or a junk dimension?

Post  ngalemmo on Thu Jul 10, 2014 9:01 am

Under no circumstances would I consider creating a junk dimension for each indicator. Replacing a simple boolean with an integer foreign key doesn't make sense.

You could create ONE junk dimension for all three attributes depending on what a 'key off code' is. Is this actually a reference to a specific transaction or is it a low cardinality classification code? If the latter, create one junk dimension with all three attributes. If it is a transaction reference store it as a degenerate dimension. At which point, since you have only two boolean's left over, keep those as degenerate dimensions as well.
avatar
ngalemmo

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

View user profile http://aginity.com

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