Configuring database connection.