21. A method implemented in a query system, the method comprising: providing a query engine having a capability to build objects in a memory based upon a view type referenced in a query received from an application; and 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.
21. A method implemented in a query system, the method comprising: providing a query engine having a capability to build objects in a memory based upon a view type referenced in a query received from an application; and 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. 24. The method of claim 21 further comprising: sending all of the query to a data source to resolve without performing any object building, even though the query references the view type, if the query does not request a handle on an object and if the query does not reference a method.