Changes

Jump to navigation Jump to search
425 bytes removed ,  11:18, 12 August 2015
no edit summary
=Execute a query=
 
The [[Commands#XQUERY|XQUERY]] command lets you run a query.
* For example, this query returns all country nodes in the currently opened database.
</code>
=Create a new More databasecommandsNow we will create another database from the [http://files.basex.org/xml/xmark.xml xmark.xml] document.
* Create and open a new Now we will create another database 'from the [http://files.basex.org/xml/xmark', and run a query.xml xmark.xml] document:
<code>
> [[Commands#CREATE DB|CREATE DB]] xmark xmark.xml; > [[Commands#XQUERY|XQUERY]] //people/person/name
</code>
 
=Switch the database=
* The following command lists all databases than can be opened by the currently logged in user:
 
<code>
> [[Commands#LIST|LIST]]
<code>
> [[Commands#OPEN|OPEN]] factbook
</code>
 
* To get information on the currently opened database, type:
<code>
> [[Commands#INFO|INFO]]
</code>
=Close or delete a database=
 
* To [[Commands|close]] the current database, please type:
<code>
=Create a collection=
 
'''What is a collection?'''
 
With BaseX you can group documents into one logical collection. A collection is a database that contains two or more documents. Collections accept any type of XML documents, regardless of their structure.
=Delete a document=
 
* Deleting a document from a collection is easy:
<code>
=Delete a collection=
 
Deleting a collection is the same as deleting a database.
</code>
=Get server informationBackup and restore=Several commands help to explore the state of a server. For a complete list, please visit the [[Commands]] Section.
* To see all databases on the server, type:
<code>
> [[Commands#LIST|LIST]]
</code>
 
* To see the general information of the opened database, type:
<code>
> [[Commands#INFO|INFO]]
</code>
 
* To list all sessions that are managed by the server instance, type:
<code>
> [[Commands#SHOW USERS|SHOW USERS]]
</code>
 
=Backup and restore=
* To backup your database, type:
<code>
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu