many thanks in advance for taking the time to look at my question.
(I am aware of this question Nonrelational Databases for C++, but my needs are a bit different and it only has one answer.)
I am developing a commercial C++ library that must, among other things, persist messages. I would like to avoid reinventing the wheel by writing my own DBMS. Unfortunately, I have the following restricting criteria:
- It must be usable from C++ - I'm writing a C++ library. Bindings are potentially acceptable, if the level of effort to make them work isn't too high.
- I need an embedded database. Stand-alone will not work.
- I want to avoid a relational database. In addition to concerns about performance overhead, there are technical politics beyond my control as a developer that discourage a relational database.
- I need a permissive free software license. It'll be hard to buy licenses, but the client doesn't want to give his source away.
- I'd like a solution that's established开发者_如何转开发 (been around for at least a little while, beyond the experimental stage, has been used by several projects).
Sadly, the two go-to choices don't work because of the above: -SQLite is relational -BerkeleyDB is GPL or commercial
Again, thanks for any help.
Use SQLite
in b-tree
mode. Public domain. Avoids politics. Let's you work around the political issues by avoiding the SQL interface for performance-critical paths, and optionally using the SQL parser path for those queries that are not on the critical path.
Both Tokyo Cabinet and QDBM are LGPL and have C APIs.
精彩评论