Is there a database with git-like qualities?

I am looking for a database in which several users can enter and record new data; other users can then pull this data into their own database repository, all in git style. Transcription database, if you want; does such a thing exist?

My real thinking is to dump the database into a single file in the form of SQL, but this can become cumbersome if it has any size. Another option is to dump the database and use the file system, but again it becomes cumbersome once of any size.

+7
source share
3 answers

This is not SQL, but CouchDB supports database replication and push / pull changes between users in a way similar to what you describe.

See the replication chapter of the O'Reilly CouchDB book for more information.

+3
source

There is Irmin: https://github.com/mirage/irmin


It is currently only offered as an OCaml API, but there are future plans for the GraphQL and Cap'n'Proto APIs.

Despite the complex API and still scanty documentation, it allows you to connect any backend (In-Memory, Unix Filesystem, Git In-Memory and Git On-Disk). Thus, it works even on Unikernels and browsers.


It also offers a bi-directional model in which changes to the local Git repository affect the state of the application and vice versa. With a sophisticated API, you can work at any Git level:

  • Add only blob storage .
  • Transactional / Compound Tree Layer.
  • A commit layer with a change chain and metadata.
  • Layer Branch / Ref / Tag (only local, but also offers remote) for variability.

Immutable storage is often associated / considered for blobs + trees + commits in the documentation.


Thanks to the content-addressing inherited Git function, Irmin allows deduplication and therefore reduces memory consumption. Some functionally robust data structures fit perfectly into this database, and tripartite joining is a new approach for handling CRDT-style join conflicts.

+3
source

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

For a while I was looking for the same function for Postgres (or SQL databases in general), but I did not find suitable tools (simple and intuitive). This is probably due to the binary nature of data storage. Clonio sounds perfect, but looks dead. Noms DB looks interesting ( and lively ). Also take a look at Irmin (based on OCaml with Git properties).

Although this does not answer the question that it will work with Postgres, check the Flur.ee database . It has a function of "time travel", which allows you to request data from an arbitrary point in time. I suppose this should be able to work with a branching model.

This database was recently developed for blockchain purposes. Due to the nature of blockchains, data must be written incrementally, just like git works. They aim at an open source release in the second quarter of 2019 .

Since each Fluree database is a blockchain, it stores the entire history of each transaction completed. This is part of how blockchain ensures the immutability and security of information .

0
source

Source: https://habr.com/ru/post/1305980/


All Articles