28. The method of claim 21 wherein the step of applying query rewrite optimizations further comprises: submitting the rewritten query to a data source without object building if the query referencing the view type only requests values to be returned.
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.