refactorDB