In addition, databases may considerably increase in size, as whitespaces used for indenting an XML document will be interpreted and stored as additional text nodes. If your XML resources are structured and have no [[Full-Text#Mixed Content|mixed content]], it is advisable to enable whitespaces stripping when importing them to a database.
==Resource Types==
In addition to XML and binary resources, a third resource type has been added: XQuery values (atomic items and nodes, sequences, maps, arrays) can now be stored in databases as well. The {{Function|Database|db:put}} and {{Function|Database|db:get}} can be used to store to and retrieve values.
The new feature can e.g. be used to store maps in a database:
<syntaxhighlight lang="xquery">
db:put(
'factbook',
map:merge(
for $country in db:open('factbook')//country
return map:entry($country/@name, $country//city/name ! string())
),
'cities'
)
</syntaxhighlight>
…and use them as index later on:
<syntaxhighlight lang="xquery">
let $cities := db:get('factbook', 'cities')
for $country in ('Japan', 'Indonesia', 'Malaysia')
return $country || ': ' || string-join($cities?($country), ', ')
</syntaxhighlight>
==Backups==