C ++数据库访问,无需安装 [英] C++ Database Access With No Required Installation

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

问题描述

我要寻找可以我运行SQL语句,而不到已经安装了数据库服务器有一个数据库。即我需要选择/插入/更新只给出数据库文件和任何外部库数据库的能力。

I am looking for a database that can I run SQL statements on without having to have a database server installed. I.e. I need the ability to select/insert/update a database given only the database file and any external libraries.

下面是我的情况:


  • 我使用C ++通过一些奇怪格式的二进制文件,
    解析,我想将它们存储到某种类型的数据库,以提供更多的$的b $ b方便地访问这些数据。

  • 一旦文件被插入到数据库中,我将使用C#
    写一个接口/ GUI通过它用户可以进行交互与数据库。

  • 我用C ++进行读取文件,因为
    我已经写了一部分。

  • 速度
  • 我使用C#,因为它是很容易做的GUI编程

  • I am using C++ to parse through a number of oddly-formatted binary files, and I would like to store them into some type of database to offer more convenient access to the data.
  • Once the files have been inserted into the database, I will use C# to write an interface/GUI by which a user can interact with the database.
  • I'm using C++ for the speed of reading the files and because I've already written that part.
  • I'm using C# because it is much easier to do GUI programming.

下面是我的要求:

Here are my requirements:


  1. 数据库必须提供一种方法只使用外部库(无需安装)

  2. 我应该能够将数据库移动到任何(类似的[Windows]),计算机并运行我的应用程序

我相信这是可能的使用ADO或喷射或类似的东西的MS Access *的.mdb文件,不过,我想听到一些替代品。请提供数据库,并在你的答案C ++的发动机/库

I believe this is possible with MS Access *.mdb files using ADO or JET or something like that, however, I would like to hear some alternatives. Please provide the database and the C++ engine/libraries in your answer.

我的重点是:


  1. 精简版-ness

  2. 性能(插入的速度/选择)

  3. 客户简化代码(即它是多么容易设立)

感谢大家。

推荐答案

您不能出错这里 SQLite的

有小到可以嵌入在许多应用程序(如见这里著名应用范围从Photoshop到苹果邮件+ Safari浏览器,Dropbox的,火狐,Chrome,Skype和更多),还不足以完全覆盖你可能最需要SQL方面的列表。大力支持也和覆盖面广的API和语言方面。

It is small enough to be embedded in many apps (see e.g. here for a list of famous apps ranging from Photoshop to Apple Mail + Safari, Dropbox, Firefox, Chrome, Skype and more), yet complete enough to cover most SQL aspects you may need. Great support too, and wide coverage in terms of APIs and languages.

它可以有锁和多个写访问的问题。但是,对于一个客户端它应该工作完全正常。

It can have issues with locks and multiple write accesses. But for a single client it should work perfectly fine.

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

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