用于C ++的非关系数据库 [英] Nonrelational Databases for C++

查看:119
本文介绍了用于C ++的非关系数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在想一个很明显需要持久化存储的项目。当我碰到一篇文章简要地提到CouchDB时,我将不愿意决定一个RDBMS。似乎DB技术的一些进步发生了,因为我上次看,所以我想我会在这里问数据库,在我进入它之前。

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. 是开源的,我不会问任何东西,所以最好该数据库是开源和免费的。此外,软件必须在Linux和Windows上运行。

  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.

项目的某些部分必须是C ++。该项目没有足够大的代码明智地使用第二种语言。所以基本上整个事情都是C ++。

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++.

这个项目与web没有任何关系,所以最好
数据库不需要

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

我想存储的对象属于两个类别之一:基本对象和容器对象。差异是作为容器的对象将包含更多的对象,即:部分零件问题。我需要一个能够干净有效地处理这种情况的数据库。

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.

我也希望模式能够快速发展,我怀疑一些旧的数据根本不适合新的模式。所以我想保留不同版本的模式。

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.

对于应用程序的工作方式,人们会有一个以相互交换大块数据库。所以我想要简单的导入和导出数据的方法,我可以在某种程度上自动化。

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.

最后,如果数据库可以在某处

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

这是我的要求。

非技术要求
1.开源,最好免费。
2.在Windows和Linux上运行

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


  1. 具有C ++接口。

  2. 能够处理非网络应用程序,最好没有REST。

  3. 可以很好地处理部件零件问题。

  4. 可以处理多个索引。

  5. 有模式版本的概念,可以处理多个模式版本,

  6. 应该有一个简单的机制将数据从一个数据库实例移动到另一个数据库。

  7. 最好有一些测试机制。 >
  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.


推荐答案

HDF5是一个二进制格式,其行为类似于分层数据库。它有C ++和python的绑定和库(我只使用后者),它用于存储大量的数据,如在某些物理学和天文学实验中产生的数据。

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/

这篇关于用于C ++的非关系数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆