August 17, 2003
I have binifilaphobia. That’s the fear of storing data in binary files. There’s a certain comfort to using text files for data, like the comfort of getting a physical plane ticket instead of an e-ticket. Industry practice tells me that I should use a relational database like MySQL as the backend for my website, but fear keeps me with makeshift XML files.
Mostly, I fear corruption. Some mistyped batch operation will disconnect all the relations and I’ll be left with a giant binary mess that I must reconstruct manually one link at a time using verbose SQL commands. Text files I can store easily in CVS and see their diffs, I can use grep and awk and vi to batch-process changes, and I can look at the data with my own eyes. I’m touching the real data, not manipulating it through several levels of indirection, like I’m controlling some marionette that’s got access to the bits.
So it’s stupid and I should take the plunge with binary files. The advantages are compelling and the rest of the world somehow avoids losing everything catastrophically. But you can believe I’ll be exporting an XML version of the database like I’ve got some obsessive-compulsive disorder.
(Thanks to Brad Grantham for coming up with the word.)