3 ms·
The suggestion to "use SQLite" to write files should come with a caveat. Such files can still become corrupted, and cannot be inspected nor amended with a text
by networkimprov 7y ago
The suggestion to "use SQLite" to write files should come with a caveat. Such files can still become corrupted, and cannot be inspected nor amended with a text editor.
Any truly robust file-on-local-disk storage scheme for a non-cloud system should allow for manual diagnostics and repair.
- harperlee 7y agoText-based formats are the best for repairability but not so efficient for structuring, querying and storing information. It’s a tradeoff, as always!
- networkimprov 7y agoA search index can be maintained in binary format; it can be rebuilt in the event of corruption.
- harperlee 7y agoThat’s not a good counterexample if that is what you attempted, for 2 reasons: - An index is redundant information but dropping it and recreating it is not “repairability” as in “I read and amend a text”. You compare apples to oranges. - What I wrote still applies to an index, so that’s orthogonal: a binary index will be more efficient but harder to repair than a text-based binary index.
- cjfd 7y agoAlso, schema updates are quite hopeless with sqlite. One cannot even rename a column last time I checked.
- abathur 7y agoI'm not sure I've ever tried to rename one, but the docs assert support for ALTER TABLE RENAME COLUMN (https://www.sqlite.org/lang_altertable.html https://www.sqlite.org/lang_altertable.html).