Patent Document ID: 7685150
Application ID: 11237286

Base Claim:
1. A method comprising: a database server running on one or more computers; said database server receiving a first database statement; wherein the first database statement requires access to a view defined as combined results of a set of database statements; wherein the first database statement includes an expression that operates on an XML construct; and said database server generating a second database statement, based on the first database statement and the view, that includes a modified version of the set of database statements in the distributive form and rewritten to include the expression that operates on the XML construct.

---

Claim 2:
2. The method of claim 1 , further comprising: determining whether any statement, from the set of database statements included in the second database statement, if executed, would return no data; and for any statement that would return no data, eliminating the statement from the second database statement, generating a reduced database statement corresponding to the first database statement.