Implement Database class separately