File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Performance and the fly likes BiTSet storage and comparaison Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "BiTSet storage and comparaison" Watch "BiTSet storage and comparaison" New topic

BiTSet storage and comparaison

schneider jean-marie

Joined: Apr 24, 2005
Posts: 8
Hello !

I would like to store into MySQL BitSet objects. I am able to only use a string to do that :

This string could be verry big comparred to the object itself (more than 5 ko).
Is it possible to be more efficient to store this BitSet into MySQL ?
One solution is to store the binary string (0010110...), which could have a lower weight than the strSubSet. But I don't kown how to obtaine it .

The second point is that I have to compare the stored BitSet (10000 or more) with one BitSet submited by somebody. What is the best way to say that subBitSet is a subset of the stored BitSet number 10, ex :
BitSet : 00010100110
submit : 00010000100

here submit is a subset of BitSet. The way I use is :
But that work only with the BitSet which I am not able to store in MySQL.

Any comment would be appreciated,
I agree. Here's the link:
subject: BiTSet storage and comparaison