Q:

headMap of JDBM

I want to use JDBM for a rather large treeMap (a few hundred gigabytes if not some terabytes). Once created I'll use it heavily to answer headMap queries. Clearly, the answer headMap will be huge (on average half of the created database) but I'll need only a few first hundred tuples from the hashMap. I suppose JDBM will not try to create an in-memory object for headMap, right? Is there a better tool (except Berkley DB) for my task?

A:

JDBM2 and JDBM3 does not create in memory for tree submaps. Overhead of submap is very small. I am using submaps in my own app  and it works great. Only problem is 'size()', on submap it traverses all submap records to count them. 
I would recommend using JDBM3 as it is probably 'stable enough' and it recently implemented 'ConcurrentNavigableMap'

