BaseX is a freely available XML DBMS that we will be using in lab and on the homework.
Since you will ultimately use BaseX on Problem Set 3, you
should begin by creating a subfolder called
ps3 within your cs460 folder if you haven’t already done so.
Then you should download the following files into your ps3
folder:
bank.xml - a bank database
that we will use in lab.
Make sure to put the files in your ps3 folder. If your browser
doesn’t allow you to specify where a file should be saved, try
right-clicking on each link above and choosing Save as... or Save
link as..., which should produce a dialog box that allows you to
choose the correct folder for the file.
Once you have completed the steps outlined above, you can perform queries by taking the following steps:
Start up the BaseX GUI by double-clicking on the JAR file that you downloaded above.
Select the Database->New menu option, click the Browse button, and use the resulting dialog box to find the XML file that contains the database that you want to work with (e.g., the bank database that you donwloaded above).
Click Open to select the file, and click OK to create the database.
To execute a query, enter it in the Editor pane in BaseX, and click the green play button to execute it. (You can also use Ctrl+Enter or Ctrl+Return for this purpose.)
To test the installation, you could try the following sample query for the bank database:
/bank/customer/name
The results (if any) will be displayed in the Result pane.
If you have trouble getting BaseX to work on your machine, here are some possible options:
On newer Macbooks, try downloading a newer version of the BaseX
JAR file: Base114.jar
On MacOS, try running the program from the Terminal.
First, use cd to navigate to the appropriate folder – the one that
contains the downloaded JAR file.
Then, entering the following from the command line:
java -jar BaseX114.jar
Or, if you have the original JAR file:
java -jar BaseX851.jar
If you are able to launch BaseX but you can’t open the database file, you may need to give Java permission to access the disk. One set of instructions for doing so on Macs can be found here.
If all else fails, you can run BaseX on the virtual desktop. Once you are in the virtual desktop, you can:
imdb.xml file, using the link above.Last updated on September 26, 2026.