data base refactoring