Nonrelational Databases for C++
Asked Answered
O

2

2

I was thinking of starting a project that very clearly needs a persistent store. I was about to reluctantly decide on a RDBMS, when I came across an article which briefly mentions CouchDB. Seems some advancements in DB technology have happened since I last looked, so I thought I would ask here about databases before I got into it.

Here are my criteria. ( I list the criteria again at the end, so if you want to skip the explanations just scroll down. )

  1. The project is open source and I will not be asking anything for it, so preferably the database is open source and free. Furthermore the software has to run on both Linux and Windows.

  2. There are parts of the project that have to be in C++. The project is not large enough code wise to justify using a second language. So basically the whole thing will be C++.

  3. This project will not have anything to do with the web, so preferably the database will not require the detritus of a web library.

  4. The objects I want to store fall into one of two categories: a basic object and a container object. The difference being objects which are containers will contain even more objects, ie: a parts of parts problem. I need a database that can handle such cases cleanly and efficiently.

  5. I also expect the schema to evolve rapidly, at least initially. I alse suspect that some of the old data simply will not fit into the new schemas. So I would like to keep different versions of the schema around. Win possible, I would like to be able to transform data in one to schema into another schema.

  6. For the application to work the way intended, people would have to exchange large chunks of database with each other. So I would want simple ways of importing and exporting data, which I could automate to some degree.

  7. Finally it would be nice if the database could in someway be simulated in unit tests.

THose are my requirements. I have replicated them below to make it easier for people answering.

Thank you

Non Technical requirements 1. Open source preferably free. 2. Run on Windows and Linux

  1. Has a C++ interface.
  2. Is able to handle a non-web application, preferably without REST.
  3. Can handle a "parts of parts" problem fairly well.
  4. Can handle multiple indexes.
  5. Has sort of concept of schema version, can handle multiple schema versions, and can migrate tables from one schema to another.
  6. Should have a simple mechanism for move data from one instance of the database to another.
  7. Preferably has some mechanism for testing.
Oldtime answered 15/10, 2009 at 17:28 Comment(0)
P
2

HDF5 is a binary format which behaves like an hierarchical database. It has binding and libraries for C++ and python (I only use the latter) and it is used to store big amounts of data, like the ones produces in certain physics and astronomy experiments.

http://www.hdfgroup.org/HDF5/

Palocz answered 15/10, 2009 at 17:37 Comment(0)
P
0

I've looked at a few nosql databases some time ago (had an different requirement than than you though - needed it to be a standalone server). The ones that I remember as particularly interesting are Redis and Kyoto Cabinets. Have a look.

BTW, you don't mention any performance requirement. If so, have you considered SQLite? Simple, embedded, stable, and with the flexibility of SQL after all. With prepared statement the performance penalty of SQL should not be very high.

EDIT: ooops, just noticed that you asked this more than a year ago... Well, perhaps you can tell us what you've chosen :)

Phylum answered 12/4, 2011 at 21:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.