Andrew Wiles, Prover of Fermat's Last Theorem |
A code error can always cause some corruption, because a monolithic DB kernel running on a monolithic Unix kernel could always have problems. However, there has recently come to light a way out of this snafu, a mathematical light at the end of the tunnel. Something used for microprocessors but just starting to be used for operating systems. Formal mathematical verification.
In normal programming tasks, formal verification is too restrictive and unwieldy for regular use. However for infrequently changed but extremely critical software, formal verification is becoming more than just a toy. An entire microkernel, seL4 of the L4 family, has recently been formally proven correct. The increasing speed of computers and sophistication of automated proof checkers is making this possible. One can picture this being only the groundwork for formal proofs of additional basic kernel libraries, i/o, filesystems, network stacks. And eventually, applications, at least the critical parts of them.
And this brings us to the DB. On top of a formally verified microkernel, and a verified filesystem, I want a verified database microkernel. I'm not talking about verifying that all my SQL statements are 100% accurately implemented, no, what I'm seeking here is formal verification of ACID semantics. So that certain operations are guaranteed to occur, and file corruption is guaranteed never to occur.
We're not just talking about Oracle / DB2 / Sybase / SQLServer here, you want the same consistency guarantees on NoSQL solutions as well. I may be able to tolerate my data being updated at different times in different places, but I don't want my account balance to be randomly altered due to some corrupted file.
This formal verification approach at the DB level would not only remove a huge chunk of potential bugs, it would bring us certainty on the basics, so we can focus more on the larger tasks, like distributed horizontal key/value stores such as BigTable, efficient spatial functions, social graphs solvers. And it might give DBAs more sleep at night.
Formal verification of an operating system security kernel (Computer science)