Changes

Jump to navigation Jump to search
92 bytes removed ,  14:07, 17 January 2011
no edit summary
This step by step tutorial shows you how to run BaseX in client-server mode from a terminal. You can copy & paste the commands to get it running on your machine. After you finished this tutorial, you will be familiar with the basic administration of BaseX. Visit the [[Commands|commands section]] for a complete list of database commands.
==StartupStart BaseX Server and Client==
Please have a look at the [[Startup Overview]], and start a server and a client instance of BaseX.
==First Operations==To get familiar with BaseX, we suggest to execute the following basic operations. ===Create a database===
* To create a database you need an XML document, e.g. [http://www.w3.org/XML/Binary/2005/03/test-data/Over100/factbook.xml factbook.xml].
* Save this document to the directory your working in.
Databases are stored in the BaseXData directory which is located in your home folder. Depending on your operating system the location of your home folder varies. For example, on a mac it's /Users/John, if your name is John.
===Execute a query=Query==
The [[Commands|xquery]] command lets you run a query.
* For example, this query returns all country nodes in the currently opened database.
</code>
===Create a new database=Database==
Now we will create another database. You can find the example document here: [http://phobos101.inf.uni-konstanz.de/basex/demo].
</code>
===Switch the database=Database==
* You can explicitly query the factbook database with the doc()-funtion, no matter what the current context is.
<code>
</pre>
===Close or delete a database=Database==
* To [[Commands|close]] the current context database type:
<code>
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu