Changes

Jump to navigation Jump to search
110 bytes removed ,  01:54, 6 June 2012
no edit summary
rights are required by a user to perform a command in the client/server architecture.
A shortcut exists for some of the command keywords. For example, you may replace
the {{Code|DATABASEDB}} keyword with {{Code|DB}}.
=Conventions=
Both database and user names must follow the same naming constraints. Valid names may contain letters, numbers, underscores and dashes. Names must have at least one character; they also should not be longer than 128 characters, although this is not enforced. A regular expression matching valid names is <code>[-_a-zA-Z0-9]{1,128}</code>.
==ShortcutsAliases==
In all commands, the {{Code|DATABASEDB}} keyword can be replaced by the shortcut {{Code|DBDATABASE}}.
=Database Operations=
==CREATE DATABASEDB==
{|
|-
| width='90' | '''Signature'''
|{{Code|CREATE DATABASE DB [name] ([input])}}
|-
| '''Permission'''
| '''Examples'''
|
* {{Code|CREATE DATABASE DB input}}<br/>creates an empty database {{Code|input}}.* {{Code|CREATE DATABASE DB xmark http://files.basex.org/xml/xmark.xml}}<br/>creates the database {{Code|xmark}}, containing a single initial document called {{Code|xmark.xml}}.* {{Code|CREATE DATABASE DB coll /path/to/input}}<br/>creates the database {{Code|coll}} with all documents found in the {{Code|input}} directory.* {{Code|SET INTPARSE false; CREATE DATABASE DB input input.xml}}<br/>creates a database {{Code|input}} with {{Code|input.xml}} as initial document, which will be parsed with Java's [[Parsers#XML Parsers|default XML parser]].
|}
|-
| '''Summary'''
|This command combines [[#OPEN|OPEN]] and [[#CREATE DATABASEDB|CREATE DATABASEDB]]: if a database with the name {{Code|[input]}} exists, it is opened. Otherwise, it creates a new database and stores the specified input as initial content.
|-
| '''Errors'''
=Administration=
==ALTER DATABASEDB==
{|
|-
| width='90' | '''Signature'''
|{{Code|ALTER DATABASE DB [name] [newname]}}
|-
| '''Permission'''
| '''Examples'''
|
* {{Code|ALTER DATABASE DB db tempdb}}<br/>renames the database {{Code|db}} into {{Code|tempdb}}.
|}
==DROP DATABASEDB==
{|
|-
| width='90' | '''Signature'''
|{{Code|DROP DATABASE DB [name]}}
|-
| '''Permission'''
|}
==INFO DATABASEDB==
{|
|-
| width='90' | '''Signature'''
|{{Code|INFO DATABASEDB}}
|-
| '''Permission'''
=Server Administration=
==SHOW DATABASESDBS==
{|
|-
| width='90' | '''Signature'''
|{{Code|SHOW DATABASESDBS}}
|-
| '''Permission'''
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu