On 2/3/08, Sam Halliday <sam.halliday@gmail.com> wrote:
I think I may look into creating a Serializer that uses a dedicated
table for removing the duplication of data in Java's serialization.
Has anybody looked at this before?

There's various alternatives out there, from using Externalizable to customized ObjectOutputStreams.  The right solution will depend on the nature of your objects.

After that, I want to get secondary keys working... JDBM doesn't seem
to support secondary keys (or does it?). It should be possible to
emulate secondary keys by having a dedicated table for each secondary
key, with the value being the primary key. That will unfortunately
result in an additional lookup (instead of secondary key -> value, it
will have to be secondary key -> primary key -> value, with each arrow
denoting a DB lookup).

I'd recommend 2 BTrees/HTrees:

primary key -> recid
secondary key -> recid

with your main objects retrieved directly from recid.   Recid-based lookup is pretty efficient so you'd have no double-indirection.