The [[Database Functions#db:add|db:add()]] or [[Database Functions#db:replace|db:replace()]]
function can be used to add the specified source files into the database.
The following example query adds all CSV files to the database <code>DB</code>that are foundin the directory <code>2Bimported</code>, and interprets the first lines ascolumn headers:
<pre class="brush:xquery">
for $file in file:list("csv", true(), "*.csv")
return db:add('dbDB', $file)
</pre>