Connect the database.