Home | Getting Started | Documentation | Demo | Download | Support |
Sedna Quick StartThis guide the fastest way to understand basic facilities of the Sedna XML Database. It provides a number of easy exampes which can be run directly in command line and describes how to run examples provided with Sedna. In case of differences between the Windows and Unix (Linux, FreeBSD, MacOS, etc) versions of Sedna they are marked with In this guide Contents:
See also: Download and Install SednaDownload a copy of the prebuilt binaries for your machine, or get a copy of the sources and compile them yourself (download page). Installing Sedna from binaries is easy, you just need to unzip archive (on Windows) or run self-extracting script (on Unix). For more information on installation see Sedna Installation Guide orINSTALL file in the root of your Sedna distribution.
Start and Shutdown SednaTo start Sedna server go to se_gov
To shutdown Sedna server run: se_stop
Create and Run a DatabaseTo create a database named se_cdb testdb
To run the se_sm testdb
To shutdown the se_smsd testdb
You can find more information on how to configure databases in Administration Guide. Run Queries via Command LineYou can run queries in Sedna either via command line or via Sedna API. To get started with writing programs that work with Sedna API, see Getting Started With C API. To run queries via command line:
[win:] se_term -query "let $a:=(3, 1, 7) return <result>{ max($a) }</result>" testdb
[nix:] se_term -query "let \$a:=(3, 1, 7) return <result>{ max(\$a) }</result>" testdb or put your XQuery query in a file (for example se_term -file 1.xquery testdb
se_term testdb
and print your queries. Use ampersand and line feed to terminate the query. (&newline terminates the query).
Read more about Run Command Line ExamplesSedna distribution comes with an example set based on the XMark XML benchmark. This set allows you to investigate the features of Sedna easily. Examples include bulk load of a sample XML document and a number of sample XQuery queries and updates to this document. Below we will show how to run one of them. Examples are located in the directory:
[win:] INSTALL_DIR\examples\commandline
[nix:] INSTALL_DIR/examples/commandline To run the example, type the following commands in the command prompt:
|