Database refactoring: Replace table with view