|-
| width='120' | '''Signatures'''
|{{Func|db:create|$db as xs:string|empty-sequence()}}<br/>{{Func|db:create|$db as xs:string, $inputs as item()*|empty-sequence()}}<br/>{{Func|db:create|$db as xs:string, $inputs as item()*, $paths as xs:string*|empty-sequence()}}<br/>{{Func|db:create|$db as xs:string, $inputs as item()*, $paths as xs:string*, $options as itemmap(xs:string, xs:string)|empty-sequence()}}
|-
| '''Summary'''
|Creates a new database with name {{Code|$db}} and adds initial documents specified via {{Code|$inputs}} to the specified {{Code|$paths}}. An existing database will be overwritten.<br/>{{Code|$inputs}} may be strings or nodes different than attributes. If the {{Code|$input}} source is not a file or a folder, the {{Code|$paths}} argument is mandatory.<br/>Please note that {{Code|db:create}} will be placed last on the [[XQuery Update#Pending Update List|Pending Update List]]. As a consequence, a newly created database cannot be addressed in the same query.<br/>The {{Code|$options}} argument can be used to change the indexing behavior. Allowed options are all [[Options#Parsing|parsing]], [[Options#XML Parsing|XML parsing]], [[Options#Indexing|indexing]] and [[Options#Full-Text|full-text]] options in lower case. Options can be specified either...<br />* as children of an {{Code|<options/>}} element, e.g.<pre class="brush:xml"><options> <textindex value='true'/> <maxcats value='128'/></options></pre>* or as map, which contains all key/value pairs:<pre class="brush:xquery">map { "textindex": true(), "maxcats": 128 }</pre>
|-
| '''Errors'''