以 CD 形式分发的数据库

发布于 2024-07-21 16:33:10 字数 230 浏览 7 评论 0原文

在 CD-ROM 上分发小型数据库的好方法是什么?

数据库必须加密。 它必须在 WinXP 和 Vista 上运行。 该应用程序是用 C# 编写的,并且也以 CD 形式分发。 记录只能读取,不能写入。

运行安装程序是可以的,但我们不想这样做。

DB 有 100000 条记录,性能不是主要目标。

编辑: 是的,用户必须输入密码才能解密数据库。

What is a good way to distribute a small database on CD-ROM?

The Database has to be encrypted.
It must run on WinXP and Vista.
The application is written in C# and is also distributed on CD.
Records are only read but not written.

Its ok to run an installer, but we prefer not to do it.

The DB has 100000 records and performance is not the primary goal.

EDIT:
Yes the user will have to enter a password to decrypt the database.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

定格我的天空 2024-07-28 16:33:10

我将使用 SQLite 来实现此目的。

实际上重新阅读您的问题,您甚至可以使用平面文件或 XML 文件,因为不需要性能或更新/添加。

不过,如果随着应用程序的成熟,您有可能需要添加/更新此数据源,请使用 SQLite。

I would use SQLite for this.

Actually re-reading your question, you could even use a flat or an XML file, given that there is no need for performance or updates/adds.

If there is any chance you will need to add/update this data source as your app matures, though, go with SQLite.

策马西风 2024-07-28 16:33:10

老实说...如果你能做到的话我会使用加密的 XML 文件。
无需安装,可在任何地方运行(文本文件没有依赖性),速度快,并且由于不需要更新,这将使其变得更加容易。

Honestly... If you can do it I would use encrypted XML files.
No install,runs anywhere (text files have no dependencies), fast and since updates are not necessary, that would make it even easier.

风吹雪碎 2024-07-28 16:33:10

MS-SQL (Express) 对只读数据库有明确的设置。 我不确定加密。

我非常确定 Sql Server Compact (SSCE) 也将允许只读,并且支持加密。 但您必须将密码存储在某处...

SSCE 可能允许您运行 w/oa 设置。

考虑到数据的大小,还可以使用已填充并保存到磁盘的数据集。 您可以使用标准库进行加密和压缩。

MS-SQL (Express) has an explicit setting for read-only Databases. I'm not sure about encryption.

I'm quite sure that Sql Server Compact (SSCE) will also allow read-only, and it supports encryption. But you'll have to store the password somewhere...

The SSCE will probably allow you to run w/o a setup.

Given the size of your data, it will also be possible to use a Dataset that is filled and saved to disk. You can use the standard libraries for encryption and compression.

过期情话 2024-07-28 16:33:10

如果您在英国的政府机构工作,请尽量不要将 CD 留在火车上或邮寄......:)

If you work for a govt agency in the UK, try not to leave the CD on the train or send it in the post... :)

独自唱情﹋歌 2024-07-28 16:33:10

数据库必须加密

快速问题:如何解密? 正确的是,通过让用户输入解密密码,或者不正确的是,将解密密钥添加到您的应用程序中,这意味着可以轻松提取它?

因为如果是解决方案 2,那么您可以通过完全放弃加密要求来扩大可能的数据库选项。

我也在寻找嵌入式数据库,根据我收到的答案,我选择了 SQLite,它是 易于实施

The Database has to be encrypted

Quick question: How do you decrypt it? Properly, by having the user type in the decryption password, or improperly by adding the decryption key to your application, which means it can be easily extracted?

Because if it's solution 2, then you can broaden your possible database options by dropping the encryption requirement altogether.

I was looking for an embedded database also, and based on the answers I received, I went with SQLite, which is easy to implement.

空心↖ 2024-07-28 16:33:10

SQL Server CE 是 SqlServer 的精简版本 (CE代表精简版),支持加密。 数据库由一个文件组成。

该软件由一组 DLL 组成,您可以将其与 exe 并排复制。

(不要被 CE 愚弄了:除了 Windows Mobile 版本之外,还有桌面 Windows 版本。)

SQL Server CE is a stripped down version of SqlServer (CE stands for Compact Edition) that supports encryption. The DB consists in one single file.

The software consists in a set of DLL that you copy side by side with your exe.

(Don't be fooled by the CE: There is a Desktop Windows version in addition to the Windows Mobile version.)

秋千易 2024-07-28 16:33:10

正如其他人指出的那样,存在支持只读访问的数据库。

至于加密,SQLite至少有一个支持加密的扩展

你也可以选择任何只读 dbms 并保留 pk 和 fk,但手动加密内容字段(即通过代码)

As others pointed out, there databases which support read-only access.

As for encryption, SQLite has at least one extension supporting encryption

You may also choose any read-only dbms and keep pk's and fk's, but encrypt the contents fields manually (i.e. by code)

南风起 2024-07-28 16:33:10

SQLite 也是我的第一个想法,但尽管我一般不喜欢 XML 并考虑到只读方面,但我认为 XML 的自定义加密可能是最好的选择。 逆向工程会更困难。

SQLite was also my first thought, but despite my general dislike of XML and considering the read only aspect, then I think custom encryption of XML might be the best option. It would be harder to reverse engineer.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文