I have a project that requires the data storage to be version controlled (e.g. in git or svn). To be clear, I mean versioning of the contents of the data store, not the schema. We will take snapshots of the data itself, for example to be able to restore to a previous state. Branch and merge is also needed.
The basic requirements are:
And ideally:
I've looked at various options. Merge is hard with SQLite (binary format). CouchDB has great merge possibilities (multimaster replication), but doesn't allow different directories for each data store. Plain JSON or other text files make queries and relationships hard.
Is there a data storage format that can be version controlled in this way? How would you solve this problem?
EDIT (more context): the specific use case is to implement distributed software issue tracking, in a similar style to Fossil SCM. But while I am interested in existing tools that solve this, I'm particularly interested in exploring and understanding different data store options that could be used to build such a tool.
One solution that comes to my mind is to convert your data into a format that support versioning control. For instance XML
. Then when you want restore your data to a specific version, just checkout the corresponfing XML
and do the oposite.
There is also an XML based database engine: BaseX
Taken from BaseX
site:
BaseX is a light-weight, high-performance and scalable XML Database engine and XPath/XQuery 3.0 Processor, which includes full support for the W3C Update and Full Text extensions. An interactive and user-friendly GUI frontend gives you great insight into your XML documents.
You can take a look at this too (Oracle): Generating XML Data from the Database
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With