finished ConnectionManager and DatabaseManager