database refinement