13. The program of claim 12 further comprising: means for building objects if the query requests a handle; and means for pushing down some of the predicates of the query to the database management system to restrict the results and thereby the number of objects that have to be built to resolve the query.
12. A program having computer readable program code means on a computer usable medium, the program comprising: means having a capability to build objects in a memory based upon a view type referenced in a query received from an application; and means for applying query rewrite optimizations to the query referencing the view type, wherein the query rewrite optimizations determine which portions of the query to push down to a database at a second tier for resolution and which portions of the query are to be processed by the query engine at a first tier to build objects from the view types.