The following commands create an empty database, add two resources, explicitly flush data structures to disk, and finally delete all inserted data:
<presyntaxhighlight>
CREATE DB example
SET AUTOFLUSH false
FLUSH
DELETE /
</presyntaxhighlight>
You may also use the BaseX-specific [[Database Module|XQuery Database Functions]] to create, add, replace, and delete XML documents: