1. A method used for managing XML data in a database system, comprising the steps of: a database server receiving a XML schema; wherein said XML schema includes a plurality of declarations, each declaration of said plurality of declarations defining a collection element; and for each declaration of said plurality of declarations: making, based one or more factors, a certain determination of a form of VARRAY storage to use for a database representation of the respective collection element, and said database server generating mapping data that maps said respective collection element to the form of VARRAY storage determined by said certain determination.