MongoDB 的类似 SQLite 的替代品?

发布于 2024-08-22 12:56:26 字数 1539 浏览 14 评论 0原文

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

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

发布评论

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

评论(4

囍笑 2024-08-29 12:56:26

我知道,这个问题是 5 年前提出的,但为了完整起见,嵌入式 MongoDB 已经发生:

https:// /github.com/hamiltop/MongoLiteDB

I know, the question was asked 5 years ago, but just for completeness' sake, embedded MongoDB has happened since:

https://github.com/hamiltop/MongoLiteDB

娇俏 2024-08-29 12:56:26

它还没有准备好,但 CouchDB 的嵌入式版本已经在长期路线图上。

复制旨在通过 CouchDB 启用离线应用程序。如果您最终有非常具体的需求,您可以将数据从 couchdb 复制到本地数据结构,在本地存储,更新它,然后通过复制将数据推回,但这需要一些代码。

It's not ready yet, but embeddable version of CouchDB are on the long term roadmap.

Replication is intended to enable offline applications with CouchDB. If you ended up with very specific needs you could replicate data from couchdb to a local datastructure, store it locally, update it, and push the data back via replication but it would take some code.

今天小雨转甜 2024-08-29 12:56:26

如果您使用 Perl,我推荐 DBM::Deep,它在磁盘上存储任意数据结构,包括带有提交/回滚的事务,并且它是非 C 单一 Perl 模块安装。没有比这更轻的了。

If you were using Perl, I'd recommend DBM::Deep, which stores arbitrary data structures on disk, including transactions with commit/rollback, and it's a non-C one-Perl-module install. Doesn't get much lighter than that.

奈何桥上唱咆哮 2024-08-29 12:56:26

我几乎觉得你可以做一些黑客来实现这一点。

有一个表,使用 sqlite 的行 id 以及集合名称字段和文本 blob(将是 json 代码)。

有另一个表用于对集合中的字段进行索引(集合名称、字段名称、字段值、文档行 ID)。

您可以做一些包装类来处理更新和查找之类的事情。会很有趣的。

I almost feel you could do some sort of hack to achieve this.

Have a table using sqlite's row ids along with a field for collection name and text blob that would be json code.

Have another table for indexing with fields in a collection (collection name, field name, field value, document row id).

You could do some wrapper class to handle things like updates and lookups. Would be interesting.

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