Mike
2007-03-04 12:25:35 UTC
I'm starting to use Berkeley-DB on a Linux system.
Is there a way of permanently associating a secondary index with a
primary rather than having to do it explicitly in each application?
I'm looking for the ability to add indices to a database, and
maintaining them, without have to recompile my applications. I can
define the keys in terms of integer pairs (location and length of
field in the record) so I can write a generic "callback" function to
extract the key. I could maintain a list of indices in a file and
write an "open database" function to open the primary and associate
the secondaries at run time.
Ideally, I'd like to get something similar to the system of "physical"
and "logical" files used on the AS400 (for anyone familiar with such
machines).
Any suggestions (other than "get yourself an AS400 then" ;-) ) would
be much appreciated.
Is there a way of permanently associating a secondary index with a
primary rather than having to do it explicitly in each application?
I'm looking for the ability to add indices to a database, and
maintaining them, without have to recompile my applications. I can
define the keys in terms of integer pairs (location and length of
field in the record) so I can write a generic "callback" function to
extract the key. I could maintain a list of indices in a file and
write an "open database" function to open the primary and associate
the secondaries at run time.
Ideally, I'd like to get something similar to the system of "physical"
and "logical" files used on the AS400 (for anyone familiar with such
machines).
Any suggestions (other than "get yourself an AS400 then" ;-) ) would
be much appreciated.
--
Mike
Mike