Do a bit of intermediate database work