With the substantial change of declarative query languages from plain SQL to the so-called \object SQLs", in particular OQL, there has surprisingly been not much change in the way problems of query representation and optimization for such languages are tackled. We identify some of the di culties pure algebraic approaches experience when facing object models and the operations de ned for them. Calculus-style formalisms suite this challenge better, but are said not to be e ciently implementable in the database context. This paper proposes a hybrid query representation and optimization approach, combining the strengths of a many-sorted query algebra and the monoid comprehension calculus. We show that e cient execution plans beyond nested-loop processing can be derived { not only for -1 queries { in such a framework. The translation process accounts for queries manipulating bulk-typed values by employing various join methods of the database engine, as well as queries that use aggregat...