Simplifying transactions with db.