Hacker News new | ask | show | jobs
by 9712263 2734 days ago
The problem is data corruption. If a CSV is corrupted, then I could at least parse part of the data. For a corrupted SQL file, I'm done. Also, diff is not working for binary format, and it is more difficult to trace change for SQL format.

In this sense, I prefer a SQL dump file.

2 comments

What is the source of the corruption. Unlikely to be disks nowadays but people should take backups of things. Very unlikely to be a SQLite buggy write but again a backup could save you. Worse case I’m sure there are tools to recover a corrupted file.
There are plenty of things that can cause it: https://www.sqlite.org/howtocorrupt.html
Nice of them to publish a guide for those who enjoy corrupted data :)

I particularly liked Fake capacity USB sticks. I didn't even realize that was a think. I can't even...

Oh this goes way back. The first SSD drives from Hong Kong advertised double or quadruple their capacity - you didn't find out until you tried to write the N+1th block and it overwrote the 0th block. Back in the 90's?
Sqlite's sqldiff might be an okay replacement for diff in many cases - https://sqlite.org/sqldiff.html