• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

BiTSet storage and comparaison

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
To avoid criticism do nothing, say nothing, be nothing. -Elbert Hubbard. Please critique this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic