Is there any good file based key->value data-structure available in c++.
similar to std::map(template based) with a insert/delete/get of O(logn).
Is there any good file based key->value data-structure available in c++.
similar to std::map(template based) with a insert/delete/get of O(logn).
You could look at Oracle Berkeley DB it provides the underlying key, data storage mechanism that you require or as already suggested sqlite.
Perhaps you can add your own template mechanism to Databases like redist. If you have a string-based database, you need some methods to serialize/deserialize your own objects. Perhaps Google Protocol Buffers or a custom JSON/XML exporter/importer does that for you, depends whether you just want speed or easy to use.
STXXL - Standard Template Library for XXL Data Sets implements file-based containers.
It's stxxl::map is quite similar to std::map, based on B+ tree with an insert/delete/get of O(logn).