create a class to manage the connection between the db