Open Source C++ Object Oriented Database

databaseoop

Is there an open source object oriented database for C++ available?

I had looked at Object oriented Relationship Mapping (ORM) libraries like those posted here:
https://stackoverflow.com/questions/74141/good-orm-for-c-solutions

and these were intereting as well:
Object-oriented-like structures in relational databases
http://en.wikipedia.org/wiki/List_of_object-relational_mapping_software#C.2B.2B

My experience so far has been painful. The solutions don't appear to be mature and I've had difficulty even compiling some of them, and the documentation and support can be sparse.

I suppose at some level I'm trying to avoid learning SQL (I'm not a database developer). On the other hand, my gut feeling is that ORMs are an architectural 'workaround' in that they are creating a layer above a database system that inherently doesn't support objects.

My ideal database library would allow the following:

  1. Allow one to specify the object hierarchy tree based on class names, perhaps in XML or just in C++.
  2. Allow one to specify which fields of those classes should be persistent.
  3. Provide an API to create, update, delete, retreive the hierarchy of objects.
  4. Ideally, provide an API for the in-memory tree itself, including concurrent access to tree nodes.

I had worked on embedded system that had such a custom database and api.

I'm almost at the point where I'm just going to create my own and open source it.

Just wondering if there is anything off the shelf I can use.

I saw this:
http://en.wikipedia.org/wiki/Comparison_of_object_database_management_systems

and am trying to figure out this might work:

http://www.fastdb.org/fastdb.html

Thanks in advance.

Best Solution

I'm not going to make any recommendations, because I don't know of a high-quality FOSS OO database. I would however make the following observations:

  • OO database are not a way of avoiding SQL - you need both. Frankly, If you don't know SQL pretty well, your life as a professional programmer iis likely to be unhappy.

  • OO databases are mature - they have been around for well over 20 years. I personally first used one on a large project in the finance industry 15 years ago.

  • OO database are best used where relational databases fail - I've used them in complex financial instrument modeling, oil-pipeline optimisation and telco work.

  • ORM databases take the bad parts of the OO and the relational models and make something even worse of them.

  • My favourite commercial OODB is ObjectStore, but I haven't done any work with it for quite while now.

Hope that is vaguely helpful.