3. The method of claim 1 , wherein the different element indicates at least one of nodes, elements, expressions, attributes, and values defined for said particular XML document type.
1. A method for querying a durably stored collection of XML documents, the method comprising: storing said collection of XML documents in one or more base database structures managed by a database system for storing said collection of XML documents; wherein each XML document of said collection of XML documents is stored, within the one or more base database structures, in an unshredded form; based on pattern data that indicates elements defined for a particular XML document type, creating a table for the particular XML document type separate from said one or more base database structures in which said collection of XML documents are stored; wherein said table includes a plurality of columns; wherein each column of said plurality of columns corresponds to a different element indicated in the pattern data; wherein each column contains only values of the element of the XML document type to which the column corresponds; wherein each row of said table corresponds to a corresponding XML document in said collection; wherein each row of said table stores values for elements from the corresponding XML document; wherein said pattern data indicates, for each column of said plurality of columns, the different element, of the particular XML document type, that corresponds to the column; using said table to answer a first query requesting data from said collection of XML documents; responding to said first query without accessing said one or more base database structures; and responding to a second query requesting data from said collection of XML documents by providing one or more unshredded XML documents from said one or more base database structures; wherein said method is performed by one or more computing devices.