Testing database quality