Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A non-relational embedded database with a permissive free software license?

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:

  1. 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.
  2. I need an embedded database. Stand-alone will not work.
  3. 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.
  4. 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.
  5. 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.

like image 512
dwinchell Avatar asked Apr 12 '11 18:04

dwinchell


1 Answers

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.

like image 140
Andy Finkenstadt Avatar answered Sep 26 '22 23:09

Andy Finkenstadt