Consistency in Networks of Relations