Added ConnectionManager class to manage database connection