Relations and graphs