13. The method of claim 1 , further comprising: if a determination is made that the query does not include the one or more operators, then performing at least one of the steps of: processing the query against second one or more relational tables that are stored in the mid-tier cache; and sending the query to the database server, wherein the database server processes the query against the one or more databases.
1. A method for processing queries, the method comprising the computer-implemented steps of: receiving a query at a mid-tier node of a multi-tier system, wherein the mid-tier node is communicatively connected to a database server in a database tier of the multi-tier system; wherein the mid-tier node includes a mid-tier cache that is configured to cache relational tables from one or more databases managed by the database server; determining whether the query includes one or more operators for requesting first data of an eXtensible Markup Language (XML) datatype from the database server, wherein the XML datatype is supported as a native datatype by the database server; and if a determination is made that the query includes the one or more operators, then performing at least the steps of: retrieving, from the database server, first one or more portions of first one or more relational tables that are managed by the database server, wherein the first one or more relational tables store index information associated with the first data of the XML datatype in the first one or more portions; storing the first one or more portions of the first one of more relational tables in the mid-tier cache; and rewriting the query into a relational query against at least the first one or more portions of the first one of more relational tables that are stored in the mid-tier cache.