Create a connection to the database