1. A method for creating a database structure to store repeated elements in a complex type of an XML schema comprising: accessing a first schema instance of a first element type in the complex type of the XML schema; finding one or more additional schema instances of the first element type in the complex type of the XML schema; determining a total maximum number of occurrences value based on a maximum occurrence value for the first schema instance and a maximum occurrence value for each additional schema instance of the one or more additional schema instances, wherein the total maximum number of occurrences value is a maximum number of times a document element of the first element type is allowed to occur in any XML document that conforms to the XML schema; selecting a base database structure type based on the total maximum number of occurrences; and creating a base database structure for the first element type, wherein the base database structure is of said selected base database structure type; wherein determining the total maximum number of occurrences value includes at least one of: generating a counter value associated with the first element type, wherein generating the counter value associated with the first element type includes combining the maximum occurrence value for the first schema instance and the maximum occurrence value for each of the one or more additional schema instances, or selecting a highest value of the maximum occurrence value for the first schema instance and the maximum occurrence value for each of the one or more additional schema instances; wherein the method is performed by one or more computing devices.