Changes

Jump to navigation Jump to search
291 bytes added ,  10:36, 22 October 2018
no edit summary
This page is part of the [[Getting Started]] Section.
In BaseX, a ''database'' is a pretty light-weight concept. It contains an arbitrary number of may contain one or more '''resources''', which are addressed by a unique database path. There is no explicit layer for collections. : Instead, collections are implicitly created and deleted once you add , and remove resources to a databasecollections result from the existence of documents in specific paths. Resources can either be '''XML documents''' or '''raw files''' (binaries). Some information on [[Binary Data|binary data]] can be found on an extra page. Multiple databases can be addressed (queries, updated) with a single XQuery expression. As a single database is restricted to 2 billion nodes (see [[Statistics]]), resources can be distributed across multiple database instances.
=Create Databases=
New databases Databases can be created via commands, via XQuery, in the GUI, or with any of our [[Developing|APIs]]. If an initial input is specified with create, some time can be saved, as it the specified resources will be added to the database in a bulk operation:
* [[Startup#BaseX Standalone|Console]]: <code>CREATE DB db /path/to/resources</code> will add initial documents to a database
* [[Startup#BaseX GUI|GUI]]: Go to ''Database'' → ''New'', press ''Browse'' to choose an initial file or directory, and press ''OK''
Database must follow the The name of a database is restricted to a restricted set of characters (see [[Valid Names|valid names constraints]]). Various [[parsers]] can be chosen to influence control the database creationimport process, or to convert different formats to XML.
'''Note:''' A main-memory database will be created if the {{Option|MAINMEM}} option is enabled ([[Databases#In Memory Database|see below]] for more).
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu