Connecting with the database.