Re: Reliability of small database system
- Posted by Spock Sep 29, 2013
- 5628 views
Hi
Yes, you are absolutely correct, data in an sqlite database is not saved in an easily human readable format.
Of course, text files are not exactly saved in an easy-for-humans-to-read format either - how many people do you know that can look at a hard disk platter and read the text off of the magnetic coding, or look at a CD/DVD and figure out what the text says based on the pits?
Of course, computers are hardly unique in this aspect - who can read microfiche without a microfiche reader?
Just as you need the right kind of tool (a text editor or text viewer) to read text files and microfiche (a microfiche reader, or at least some kind of magnifying device), with the right tools (the sqlite command line program), the entire sqlite database becomes human readable.
Still, there may be an advantage to using text files as text files tend to be very redundant and therefore very easy to recover from all kind of corruption, even stuff like corruption caused by a bad hard disk. I don't know enough about sqlite to know if it's equal to text files in this regard (though technically it's possible for a binary format to surpass text files in this area, if the format is designed with that level of redundancy in mind).
Was that one of the original requirements?
Chris
Not for the OP (Spock).
My original post didn't specify human readability as a requirement, true. However, it is something that I want and could be related to reliability and error detection (correction). In other flat-file systems that I wrote any significant data corruption is detectable (a hash value on each line will pinpoint the problem area) and the user has the option to actually open the database file in notepad for review/repair.
regards, Spock