Database refactoring 7