有没有类似 git 的数据库?

发布于 2024-08-27 15:14:55 字数 1539 浏览 7 评论 0原文

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

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

发布评论

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

评论(3

凑诗 2024-09-03 15:14:55

有 Irmin:https://github.com/mirage/irmin


目前它仅作为 OCaml API 提供,但未来计划推出 GraphQL API 和 Cap'n'Proto API。

尽管 API 很复杂且文档仍然稀缺,但它允许您插入任何后端(内存中、Unix 文件系统、内存中的 Git 和磁盘上的 Git)。因此,它甚至可以在 Unikernels 和浏览器上运行。


它还提供了一个双向模型,其中 Git 本地存储库上的更改反映在应用程序状态上,反之亦然。借助复杂的 API,您可以在任何 Git 级别上进行操作:

  • 仅附加 Blob 存储。
  • 事务/复合层。
  • 提交层具有变更链和元数据。
  • Branch/Ref/Tag 层(仅限本地,但也提供远程)以实现可变性。

不可变存储通常与文档中的 blob + 树 + 提交相关联/被视为。


由于内容可寻址继承了 Git 功能,Irmin 允许重复数据删除,从而减少内存消耗。一些功能上持久的数据结构非常适合这个数据库,并且三向合并是一种处理 CRDT 风格的合并冲突的新颖方法。

There's Irmin: https://github.com/mirage/irmin


Currently it's only offered as an OCaml API, but there's future plans for a GraphQL API and a Cap'n'Proto one.

Despite the complex API and the still scarce documentation, it allows you to plug any backend (In-Memory, Unix Filesystem, Git In-Memory and Git On-Disk). Therefore, it runs even on Unikernels and Browsers.


It also offers a bidirectional model where changes on the Git local repository are reflected upon Application State and vice-versa. With the complex API, you can operate on any Git-level:

  • Append-only Blob storage.
  • Transactional/compound Tree layer.
  • Commit layer featuring chain of changes and metadata.
  • Branch/Ref/Tag layer (only-local, but offers also remotes) for mutability.

The immutable store is often associated/regarded for the blobs + trees + commits on documentation.


Due the Content-addressable inherited Git-feature, Irmin allows deduplication and thus, reduced memory-consumption. Some functionally persistent data structures fit perfectly on this database, and the 3-way merge is a novel approach to handle merge conflicts on a CRDT-style.

雪落纷纷 2024-09-03 15:14:55

答案来自: 如何将数据库放在版本控制?

我一直在为 Postgres(或一般的 SQL 数据库)寻找相同的功能,但我发现没有足够合适(简单且直观)的工具。这可能是由于数据存储方式的二进制性质所致。 Klonio 听起来很理想,但看起来已经死了。 Noms DB 看起来很有趣(并且活跃)。另请查看 Irmin (基于 OCaml 和 Git 属性)。

虽然这并没有回答它可以与 Postgres 一起使用的问题,但请查看 Flur.ee 数据库。它具有“时间旅行”功能,允许您查询任意时间点的数据。我猜它应该能够与“分支”模型一起使用。

该数据库最近是为了区块链目的而开发的。由于区块链的性质,数据需要增量记录,这正是 git 的工作原理。它们目标是在 2019 年第二季度发布开源版本

因为每个 Fluree 数据库都是一个区块链,所以它存储每笔交易的完整历史记录执行。这是区块链确保信息不可变和安全的一部分

Answer from: How can I put a database under version control?

I have been looking for the same feature for Postgres (or SQL databases in general) for a while, but I found no tools to be suitable (simple and intuitive) enough. This is probably due to the binary nature of how data is stored. Klonio sounds ideal but looks dead. Noms DB looks interesting (and alive). Also take a look at Irmin (OCaml-based with Git-properties).

Though this doesn't answer the question in that it would work with Postgres, check out the Flur.ee database. It has a "time-travel" feature that allows you to query the data from an arbitrary point in time. I'm guessing it should be able to work with a "branching" model.

This database was recently being developed for blockchain-purposes. Due to the nature of blockchains, the data needs to be recorded in increments, which is exactly how git works. They are targeting an open-source release in Q2 2019.

Because each Fluree database is a blockchain, it stores the entire history of every transaction performed. This is part of how a blockchain ensures that information is immutable and secure.

恋你朝朝暮暮 2024-09-03 15:14:55

它不是 SQL,但 CouchDB 支持复制数据库并以类似于以下方式在用户之间推送/拉取更改你描述。

O'Reilly CouchDB

It's not SQL, but CouchDB supports replicating the database and pushing/pulling changes between users in a way similar to what you describe.

Some more information in the chapter on replication in the O'Reilly CouchDB book.

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