Re: bitmap data, setting and using

Re: bitmap data, setting and using

 

  

Kevin, FOR BIT DATA tells DB2 that what you are storing in this column
really is not character data but rather some binary data that DB2 is not to
interpret in any way shape or form. I think what you are looking for is to
create a User Defined Type and a few User Defined Functions that operate on
this type. This is both easy to do and it is a very good thing to do as
this approach introduces strong typing to your data and will allow DB2 to
enforce semantic integrity of the data regardless of which application uses
the data. Naturally the alternative is to store it as FOR BIT DATA and
then let your applications understand the semantics of "bit 5 means object
x needs work" etc. Every time there is a change in the rule, you will have
to change all for your applications that can potentially interact with this
data. My advice, look in to UDTs and UDFs. It is simpler then it sounds.

Leon Katsnelson
Program Director, Competitive Technology.
IBM Toronto Lab
tel: (905) 413-2119
Admin Assistant: Cynthia Thomson (905) 413-3632



"Kevin Knaus "
<db2udbdba-ezmlms
hield-x52623039.x To
[Email Address Removed] "LazyDBA Discussion"
a.com> <[Email address protected]
cc
08/30/2005 11:07
AM Subject
bitmap data, setting and using










All,

When defining a column as a CHAR (10) FOR BIT DATA, I want to use it by
having each bit position represent a particular thing. Then I want to
use it to select rows from the table where certain bits are set.

Is that the normal use of "FOR BIT DATA"? If so, how do I set the
correct bits and how do I reference bit positions in a query where
clause?

If this is not the intended purpose of "FOR BIT DATA", what is the
intended purpose?

In general I am trying to use the bit data to work with approximately
1000 different objects, so I would need up to 1000 bits.

Thanks

Kevin Knaus


---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html




DB2 & UDB email list listserv db2-l LazyDBA home page