[Nix-dev] Storing complicated C++ values in bdb

Wouter uu at denbreejen.net
Tue Jul 3 20:34:52 CEST 2007


Hi,

I'd like to store more complicated C++ values (maps and lists) in the 
berkeley db, currently, only strings are supported. According to the bdb 
manual: 
http://www.oracle.com/technology/documentation/berkeley-db/db/ref/am_misc/struct.html 
<http://www.oracle.com/technology/documentation/berkeley-db/db/ref/am_misc/struct.html>I 
would have to do the marshalling by hand :|

I found this link: http://www.linuxjournal.com/article/9374 
<http://www.linuxjournal.com/article/9374> about STLdb4 which seems to 
be able to do marshalling itself.

Now the readme says:
"This is a C++ wrapper for the sleepycat db4 database.
....
As of version 0.3.1 the tarball includes the db4 library source aswell.
Sleepycat recommend projects do this and the redhat9 db4 rpms have
issues."

Ive compiled the latest STLdb4, but I haven't been able to get it 
working yet in nix. I'm not sure whether the nix- bdb is sleepcat 
complaint?, and second, they include the bdb source: db-4.1.25, but nix 
already uses db4-4.5.20, so I don't know if this will work...

I don't know if STLdb4 is a good choice or even possible in this case, 
It'll probably cost me more time than doing marshalling by hand... Or 
maybe its time for nix to use a Relational SQL database?

Any suggestions on this one are welcome :)





More information about the nix-dev mailing list