Setting up a database connection