refine database settings