(thank you for your previous mail)
I'm still looking at how you're packing your data into an 'fid'.
I do understand that your data (species, organel... etc...) are stored
in a string that allow the records to be sorted and then quickly
searched (just like a binary_search)
Instead of storing this stuff in a string why not storing this key in
a structure:
struct fid
{
//union or whatever if this struct is polymorphic
enum Species organism;
enum Organelle where;
etc...
}
*AND* then assigning a specific *comparator* for each database (
http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/db_set_bt_compare.htm
) ?
Pierre
you're the boss :-)
> The fid as it is, an ID, it is
> sorted naturally by the Berkeley api, and I am not sure how
> efficient db_set_bt_compare will be at insertion time.
ok
> Why do
> you need the structure when you have the attributes on the
> data side ?
because I like structured data ! :-)
and I would find it simpler to access the elements of the fid
if(fid.organism==HomoSpiens)....
Pierre