Programmatic database interfacing is a tricky beast to tame. We’ve had to avoid a few pitfalls along the years.