A database isn't I/O; get rid of IO!. Databases have two-phase commit support..