@ska

I suspect you're aware of this article, but if not, I suspect you may enjoy it.

sqlite.org/whyc.html

(and its companion: sqlite.org/testing.html )