25 ms·
There are purpose-built databases for this purpose such as Dolt (https://www.dolthub.com/ https://www.dolthub.com/), itself purportedly derived from noms (https
by ericschrock 7y ago
There are purpose-built databases for this purpose such as Dolt (https://www.dolthub.com/ https://www.dolthub.com/), itself purportedly derived from noms (https://github.com/attic-labs/noms https://github.com/attic-labs/noms). Because it's baked into the database, you can do complex things like diffs and merges, but it requires that you run everything on that RDBMS vs. something standard. Generic diffing from two arbitrary data states of any database is pretty challenging, even if you have all the transaction history.
- zachmu 7y agoYeah, Dolt is built for distribution / collaboration of data sets, rather than for actually hosting live data in production (although it can do that). The workflow you would use to diff your database versions would be very similar to OPs: periodically take a snapshot dump of prod, then import that snapshot into Dolt. The reason this is better than just diffing the snapshot directly (i.e. textual diff where you see which INSERT statements are present in one version but not the other) is that 1) you get git-like version control semantics where each revision is associated with a person and a commit message, and 2) you can run SQL queries to inspect what's different between two revisions, rather than needing to write some analysis program.