4 ms·
Don't use sqlite for that. Or any other application specific format that only one application can read. There is no application that has a 30 years lifespan. E
by user5994461 10y ago
Don't use sqlite for that. Or any other application specific format that only one application can read.
There is no application that has a 30 years lifespan. Expect to already have massive issues in 10 years. If you depend on a single application, you're screwed.
You want a readable long term format, you use a good old txt/csv/xml. Whatever fancy computer may come up in 2050, it's guaranteed they will ship with applications to read that.
If needs be, gzip it to save space.
- syngrog66 10y agoyou can serialize the content of a sqlite db as a SQL file. ie. plain text. therefore, best of both worlds. text. plus you get rich structure and a query language, transactions...
- B1FF_PSUVM 10y agoThis should be better advertised. I've known about SQLite for fifteen or so years, and I hadn't read about that.
- niftich 10y agoIn other instances this would be my recommendation, but OP needs to somehow capture relationships between data-items in ways that referential integrity will be maintained: this is a non-trivial challenge, because it requires application logic to enforce that referential integrity, and therefore requires an application, not just a format alone. If the requirement were merely to store some flat or hierarchical data, any run-of-the-mill file-based filesystem would fit the bill, and folder structure alone could be used to express relationships, but without simplifying the data model, this does not seem to be sufficient. SQLite manages to provide this capability and logic, and its installed base is very large, and thus lessens the likelihood that it or compatible systems disappear outright. I believe for your usecase, leaning on SQLite is preferable to coming up with your custom format to express data relationships, and your custom code to enforce those relationships. But consider the points raised elsewhere: plain text remains partially recoverable if damaged, while binary files often exhibit more brittleness.
- throwawayish 10y ago> There is no application that has a 30 years lifespan. You literally made me "chuckle out loud".
- dragonwriter 10y ago> There is no application that has a 30 years lifespan. There are plenty of application that have had much longer lifespans. Usually mainframe rather than microcomputer apps so far, but that's because 30 years ago microcomputers were fairly young. (Anyway, SQLite format is a library-specific format of a library used in hundreds [thousands?] of applications, not an application-specific format.)
- SQLite 10y agoI intend to support SQLite for 33 more years. I take that commitment seriously and plan accordingly. But even if my plans do not work out, the SQLite file format is fully documented and relatively simple. See https://www.sqlite.org/fileformat2.html https://www.sqlite.org/fileformat2.html for details. Writing a script to convert an SQLite database into a series of CSV files shouldn't take a competent hacker more than a few of hours and a novice more than a few days. Reasonable estimates are that there are more copies of SQLite in use today than any library other than zLib. I dare say that SQLite will live as long or longer than gzip, and should both disappear, I suspect you will have a much easier time recovering content from an SQLite database than you would from a gzip file.
- avh02 10y agoOh wow, hello! * blush * Serious (if redundant) question though: on year 34, is backward compatibility out the window? (that said, 33 years is probably enough time to make the standard fairly permanent anyway, so even if the developers decide to break it, there will be enough residue that I don't believe the then-old standard could disappear)
- user5994461 10y agoTsss. Amateur mistake. It doesn't matter how long your brand will live, the problem is how long the version used to make the backup will live. Let's make a backup with SQLite(Lib) 2017. Somewhen in 2030, we'll try to recover that backup. First, we realize that SQLite[Lib] 2030 can't read it. Because there were subtle changes on the format and the applications/librairies binaries for whatever reason and it cannot read that file anymore (even though everyone guaranteed that it would be readable for the next 33 years). So we look for a version of SQLite 2017 (or as close as we can get). Maybe we find one, maybe we don't. Let's say we find one... we try it and it doesn't work on Linux Redbian 2030. So we need to find an old OS from 2017. Let's assume we find one... but it doesn't recognize the current Motherboard and it cannot run on Intel 96 bits processors. So we gotta find a VM or an old computer in a garage... And we'll stop there because it's endless.