* {{Code|db:create("DB", <a/>, "doc.xml")}} creates the database {{Code|DB}} and adds the document with content {{Code|<a/>}} under the name {{Code|doc.xml}}.
* {{Code|db:create("DB", "/home/dir/", "docs/dir")}} creates the database {{Code|DB}} and adds the documents in {{Code|/home/dir}} to the database under the path {{Code|docs/dir}}.
* <code>db:create("DB", file:list('.'), (), map { 'ftindex': true() })</code> adds all files of the current working directory to a new database , preserving relative filesystem paths and creates creating a full-text index.
|}