| By Selim Mimaroglu | Article Rating: |
|
| November 30, 2005 07:15 AM EST | Reads: |
49,830 |
In this article I am going to introduce you to the open source, free (GNU LGPL license), native XML database eXist (www.exist-db-org). Data is important, no question about it. Data that can't be queried is not very useful. Users expect to have good query response time. From my personal experience and testing, I am confident in saying that eXist is a fairly good database. It has very good query response time, it is very user friendly, it's easy to set up and operate, and it's written in Java, therefore it is platform independent.
This article will show you how to use eXist as a stand-alone database server. If you have any problems or questions you can use the mailing list of eXist. The odds are somebody else had the same problem you have and it's already been answered in the mailing list.
Although eXist is written in Java, you don't have to be a Java programmer in order to use eXist. You can use the graphical user interface (GUI) for almost anything you need to accomplish. Anything that can be done through the GUI can also be done by using command line. This should please the programmers among us who are deeply attached to the command-line tools rather than fancy to GUIs. Let's start exploring eXist.
System Requirements
You need a JRE (Java Runtime Environment) 1.4 or later. This is the only requirement. The documentation states that the package is tested on Linux and Windows XP/2000. Keep in mind that it should work on other operating systems with no problem, because it's platform independent. I set it up on Dell PowerEdge 2600 running on Windows 2003 Server.
Features of eXist
eXist is a native XML database because it is designed and built for XML. Other databases, such as relational databases (Oracle, DB2, MS SQL Server 2000), can handle XML data too, but they are not native XML databases, because they aren't built for XML.
I will list only the most important features of eXist, but if you are interested, you can find a complete list of features at www.exist-db.org:
- eXist supports many popular XML query languages such as XQuery, XPath, and XSLT
- It has an automatic indexing features that lets it creates indexes while storing data
- It supports data update
- It supports SOAP and XML-RPC protocols
- It doesn't support database transactions at this time, but it supports concurrent access
1. Get JVM (Java Virtual Machine)
If you don't have a JVM on your system already (1.4 or later), you should download one for free from Sun Microsystems (http://java.sun.com/j2se/). Make sure that your version is at least 1.4. As I write, the latest version of Java is 1.5.0_05 (also known as J2SE 5.0), which is I used for this article (see Figure 1).
2. Set JAVA_HOME variable
The value of this variable is the full path to your Java installation directory. This is how I set up the JAVA_HOME environment variable on my system:
Control Panel->System->Advanced->Environment Variables->System Variables.
Next I created a new environment variable called "JAVA_HOME," with the value "C:\Program Files\Java\jdk1.5.0_05" (it may be different on your system).
To check if you set up the variable correctly, open a new command prompt window. Type "echo %JAVA_HOME%." You should see the Java installation directory printed on the screen (see Figure 2).
3. Download eXist
You can download it from www.exist-db.org. For this article I used the most recent development snapshot: "eXist-snapshot-20050805.jar." (Note that the stable version eXist-1.0b2-build-1107.jar is referred to as "ancient." Interestingly enough, it still appears at the top of the list. Get the latest development version instead of the stable version.) (see Figure 3)
In order to run the installation program type:
java -jar eXist-snapshot-20050805.jar
That's it, we have installed it. Now you should see "eXist XML Database" entry in the Start->All Programs menu. Now you are ready to run eXist database server as a stand-alone application (see Figure 4).
Start eXist database server by selecting "eXist Database Startup" at the "eXist XML Database" program menu.
Let's start the client, the GUI that allows us to perform useful database operations such as querying the data and adding a file to or deleting a file from the database.
Start the client by selecting "eXist Client Shell" from the "eXist XML Database" program menu. For now the user "admin" who is the administrator doesn't have a password by default (I recommend creating a password for the admin as soon as possible). (see Figure 5)
Storing XML
Let's use the eXist client program to store XML data. Some of the things that the client program allows a user to do are:
- create collections
- store data
- query data
- create backup
- restore files from backup
- manage users
If you don't have suitable XML data at hand you use XBench, which is an XML benchmark (see the References section for more information). It comes with a random data generator and predefined set of queries. For this article I used a 10MB XML data file generated by XBench. You can download this data at www.cs.umb.edu/~smimarog/eXist/dictionary10.xml.
Follow these steps:
- Download "dictionary10.xml" to your system.
- Create a new collection using eXist client "File->Create Collection." Name it as XBench (see Figure 6). Now, you should see two collections: System and XBench (see Figure 7). The System collection is created by eXist at the installation, and it has system information.
- Select XBench collection.
- This collection is empty at the moment.
- Select "File->Store files/directories." Browse and select "dictionary10.xml."
- This will store the data. On my system it took less than a minute to store the data. This storage time varies, depending on your system.
Published November 30, 2005 Reads 49,830
Copyright © 2005 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Selim Mimaroglu
Selim Mimaroglu is a PhD candidate in computer science at the University of Massachusetts in Boston. He holds an MS in computer science from that school and has a BS in electrical engineering.
![]() |
XML News Desk 11/29/05 07:22:28 PM EST | |||
eXist - An Introduction To Open Source Native XML Database. In this article I am going to introduce you to the open source, free (GNU LGPL license), native XML database eXist (www.exist-db-org). Data is important, no question about it. Data that can't be queried is not very useful. Users expect to have good query response time. From my personal experience and testing, I am confident in saying that eXist is a fairly good database. It has very good query response time, it is very user friendly, it's easy to set up and operate, and it's written in Java, therefore it is platform independent. |
||||
- Cloud People: A Who's Who of Cloud Computing
- Session Topics: 12th Cloud Expo / Cloud Expo New York
- Five Big Data Features in SQL Server
- GenieDB Makes MySQL Web-Scale & Always Available
- Altova Announces General Availability of RaptorXML
- Part 3 | Component Models in Java
- Component Models in Java | Part 2
- Reflections on the Future of Platform as a Service (PaaS)
- A Helpful Checklist for Selecting a New Database
- Cloud-Friendly BPM: The Power of Hypermedia-Oriented Architecture
- Fix Memory Leaks in Java Production Applications
- The New Standard: Intelligence-Driven Security
- Cloud People: A Who's Who of Cloud Computing
- Cloud Expo New York: Delivering Digital Marketing on the Cloud
- Session Topics: 12th Cloud Expo / Cloud Expo New York
- AWS Going into a New Line of Work
- Five Big Data Features in SQL Server
- How Bon-Ton Stores Align Business Goals with IT Requirements
- Amazon Cuts Prices on S3
- GenieDB Makes MySQL Web-Scale & Always Available
- Cloud Conversations: AWS EBS, Glacier and S3 Overview | Part 2 S3
- New AWS Service Pats the Hand of the Standoffish
- Cloud Conversations: AWS EBS, Glacier and S3 Overview | Part 3
- Component Models in Java | Part 1
- Where Are RIA Technologies Headed in 2008?
- Processing XML with C# and .NET
- AJAX World RIA Conference & Expo Kicks Off in New York City
- JSON vs XML - A Jason vs Freddie Sequel
- The Top 250 Players in the Cloud Computing Ecosystem
- Has the Technology Bounceback Begun?
- BPEL Processes and Human Workflow
- i-Technology Viewpoint: The Very Confused World of 3D and XML
- Generating XML from Relational Database Tables
- "HP's Problem Ain't the SAP Install," Says Sun's Schwartz
- Open Source Database Special Feature: An Introduction to Berkeley DB XML
- eXist - An Introduction To Open Source Native XML Database



























