Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a database with git-like qualities? [closed]

I'm looking for a database where multiple users can contribute and commit new data; other users can then pull that data into their own database repository, all in a git-like manner. A transcriptional database, if you like; does such a thing exist?

My current thinking is to dump the database to a single file as SQL, but that could well get unwieldy once it is of any size. Another option is to dump the database and use the filesystem, but again it gets unwieldy once of any size.

like image 946
Mat Avatar asked Apr 04 '10 18:04

Mat


2 Answers

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.

like image 101
2 revs Avatar answered Oct 01 '22 23:10

2 revs


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.

like image 23
Tails Avatar answered Oct 02 '22 00:10

Tails