How to represent boolean flag representation in FACT?
3 posters
Page 1 of 1
How to represent boolean flag representation in FACT?
I have a degenerate dimesnion called Treaty or Facultative Flag for my insurance needs. When I add the flag to the FACT Table, Is it better to add it as char(1) or 1/0 as a number?
Will there be a performance benefits in using 1/0 over the Y/N? The FACT table may contain about 15 Million Rows?
Thanks,
Will there be a performance benefits in using 1/0 over the Y/N? The FACT table may contain about 15 Million Rows?
Thanks,
rameshusa- Posts : 3
Join date : 2013-04-17
Re: How to represent boolean flag representation in FACT?
Or a Boolean.
Do whatever you want. It doesn't really matter all that much. It is a matter of style and what the business users would like to see.
Do whatever you want. It doesn't really matter all that much. It is a matter of style and what the business users would like to see.
Re: How to represent boolean flag representation in FACT?
Use the smallest numeric datatype available. Don't use boolean since you cannot sum boolean natively.
BoxesAndLines- Posts : 1212
Join date : 2009-02-03
Location : USA
Re: How to represent boolean flag representation in FACT?
BoxesAndLines wrote:Use the smallest numeric datatype available. Don't use boolean since you cannot sum boolean natively.
Yeah, but you really can't sum any of it natively. If true = 1 and false = 0, how do I sum the number of false? I need to use a comparative expression, I cannot use sum() alone.
Re: How to represent boolean flag representation in FACT?
Good point. I normally include a default metric for all fact tables with the value of 1 (really handy for factless facts). In this case of false I would sum the default metric where cond = 0.
BoxesAndLines- Posts : 1212
Join date : 2009-02-03
Location : USA
Similar topics
» What to do with boolean flag?
» How to represent survival rates in a fact table?
» Should a True/False value be a dimension
» Boolean dimensions
» Modeling help on dimension with many boolean value
» How to represent survival rates in a fact table?
» Should a True/False value be a dimension
» Boolean dimensions
» Modeling help on dimension with many boolean value
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum