parse relation definition with where clauses