Complexity Issues in Supporting Queries Involving Intermediate Sets in Relational Database Systems