How to use McKoi driver and query tool
You need McKoi driver to be able to connect to McKoi database which runs the server birch. After you download the driver, you would be able to use the Query Tool, a graphical user interface which allows you to connect to the database and execute queries. You will also need the driver for writing your program to connect to the database and store and retrieve information.
To copy the driver to your account on puma, you need to do the folowing:
Please do not download the driver from the McKoi web site: I have made several changes to it, the version posted on the McKoi web site does not have the right behaviour on our version of LINUX.
Running the Query Tool
To start the query tool, you need to change the directory to the one where the driver is located (in our example, the directory mckoi), and type in the following:
A window will pop up in which you can enter queries. By clicking on the button
java -cp mckoidb.jar com.mckoi.tools.JDBCQueryTool -url "jdbc:mckoi://birch.wellesley.edu/" -u "cs349" -p "cs349"
Run Query you can send the query to the database. The result will be displayed in the window.
Please do not type SHUTDOWN in the query window: this would cause the databse on the server to shutdown, and no one will be able to use it!
Other things to keep in mind when you are using the database:
To quit the Query Tool, just close the window. Do not type SHUTDOWN in the query window.
- For now, everyone in the class is accessing the same database, so please precede table names by your name (s.a. Kristin_table) to make sure that you are not interfering with any one else.
- The SQL syntax used in McKoi is slightly different from the syntax we have covered in class. It is also possible that it lacks some of the capabilities of the SQL standard. Please see McKoi SQL reference for details.
This page has been created and is maintained by Elena Machkasova
Comments and suggestions are welcome at email@example.com
Spring Semester 2002