How to represent boolean flag representation in FACT?

View previous topic View next topic Go down

How to represent boolean flag representation in FACT?

Post  rameshusa on Tue Apr 23, 2013 11:50 am

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,

rameshusa

Posts : 3
Join date : 2013-04-17

View user profile

Back to top Go down

Re: How to represent boolean flag representation in FACT?

Post  ngalemmo on Tue Apr 23, 2013 2:20 pm

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

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

View user profile http://aginity.com

Back to top Go down

Re: How to represent boolean flag representation in FACT?

Post  BoxesAndLines on Tue Apr 23, 2013 2:55 pm

Use the smallest numeric datatype available. Don't use boolean since you cannot sum boolean natively.
avatar
BoxesAndLines

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

View user profile

Back to top Go down

Re: How to represent boolean flag representation in FACT?

Post  ngalemmo on Tue Apr 23, 2013 3:55 pm

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

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

View user profile http://aginity.com

Back to top Go down

Re: How to represent boolean flag representation in FACT?

Post  BoxesAndLines on Tue Apr 23, 2013 10:11 pm

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

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

View user profile

Back to top Go down

Re: How to represent boolean flag representation in FACT?

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