Dolt is Git for Data: a SQL database that you can fork, clone, branch, merge
What people usually miss about these things is normal version control benefits hugely from content addressing and normal forms.<p>The salient aspect of relational data is that it&#x27;s cyclic, this makes content addressing unable to provide normal forms on it&#x27;s own (unless someone figures out how to Merkle cylic graphs!), but the normal form can still made other ways.<p>The first part is easier enough, store rows in some order.<p>The second part is more interesting: making the choice of surrogate keys not matter (quotienting it away). Sorting table rows containing surrogate keys depending on the sorting of table rows makes for some interesting bags of constraints, for which there may be more than one fixed point.<p>Example:<p><pre><code>  CREATE TABLE Foo (
    a uuid PRIMARY KEY,
    b text,
    best_friend uuid REFERENCES Foo(b)
  );
</code></pre>
DB 0:<p><pre><code>  0 Alice 0
</code></pre>
1 reclusive Alice, best friends with herself. Just fine.<p><pre><code>  0 Alice 1
  1 Alice 1
</code></pre>
2 reclusive Alices, both best friends with the second one. The alices are the same up to primary keys, but while primary keys are to be quotiented out, primary key equality isn&#x27;t, so this is valid. And we have an asymmetry by which to sort.<p><pre><code>  0 Alice 1
  1 Alice 0
</code></pre>
2 reclusive Alices, each best friends with the other. The Alices are completely isomorphic, and one notion of normal forms would say this is exactly the same as DB 0: as if this is reclusive Alice in a fun house of mirrors.<p>All this is resolvable, but it&#x27;s subtle. And there&#x27;s no avoiding complexity. E.g. if one wants to cross reference two human data entries who each assigned their own surrogate IDs, this type of analysis must be done. Likewise when merging forks of a database.<p>I&#x27;d love be wrong, but I don&#x27;t think any of the folks doing &quot;git for data&quot; are planning their technology with this level of mathematical rigor.