I got an array of java.util.BitSet
that i want to persist in my database, but i don't know whats the best way to do it.
To be precise i got x*y true or false
value for every entry that i want to store. I tought java.util.BitSet
is a good call to try, but i dont really know how could i store it in database.
I'm using MySQL database with hibernate(with annotation).
This is how i initialize my map:
Bitset[] map = new BitSet[x];
for (int i = 0; i < x; i++) {
map[i] = new BitSet(y);
}
Update:
There is no relation in this dataset, and the problem is that i have tons of these "2 dimensional arrays" and one piece is around 360*180 in size.
I also tried to make an image out of it, a monochrome pbm file is easy to make. But still the data is not in the database and every time processing the saved "image" file is overkill i think and kinda slow.