This site contains a collection of material to aid the teaching and research of databases. In particular, it contains some sample datasets in a variety of formats, and some tools which allow you to import those datasets into a relational database. It also contains some notes of using Java's JDBC to access relational databases.
The tabs to the left allow you to select the following areas:
The JDBC driver for the RDBMS you are using. For the examples it is assumed that this is a single package (but sometimes a JDBC driver comes in more that one jar file).
For example, to run a DBLibrary program db.lib.prog in a bash shell, you could execute once
export CLASSPATH=dblibrary.jar:pgjdbc2.jar:$CLASSPATH
to configure your environment, and then run (any number of times) the command
java db.lib.prog
Parameters required for running DBLibrary and using JDBC | ||
parameter | description | example |
myserver | The hostname on which the database server is running | db.doc.ic.ac.uk |
mydatabase | The name of the database in which information is to be stored | films |
mydriverjar | The file name of the JDBC driver for the database | pgjdbc2.jar |
mydriver | The Java class name of the JDBC driver for the database (which should be present in the listing produced by jar -tf mydriver.jar) | org.postgresql.Driver |
myurl | A URL for the database you wish to connect to, in a format that varies according to the value of mydriverjar | jdbc:postgresql://db.doc.ic.ac.uk/films |
myusername | The login name you have for the database server (which might not be the same as your login name for the host on which the server runs) | lab |
mypassword | The password you have for the database server (which might not be the same as your password for the host on which the server runs) | lab |