Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

BiTSet storage and comparaison

 
schneider jean-marie
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
Jean-Marie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic