Tuesday Nov 13th: Mini-Project Proposal
Tuesday Dec 4th: Turn in Assignment 7
Friday Dec 14th: Turn in Project
Update! It turns out the latest release of java has lots of new built-in functionality for sql, in a new package that you import via java.sql.*;
Most importantly, you can dynamically load in a driver, for example, for mysql. For more information, see http://java.sun.com/j2se/1.3/docs/api/java/sql/package-summary.html
I've put together some code that allows students to connect to a mysql database via jdbc, the java interface to relational databases. To use this code, you need to be able to understand and write sql queries.
One project might be to implement part of the used book recommendation system that we looked at a few weeks ago.
Another interesting project would be to store content information in a database and then have your code generate web pages from the content; that is, create a dynamically generated web site. This could be more specific than what we did in the WebDirectory home work in that each time the user clicks a link, that would be a database call to generate a new page. (This is different than but related to responding to submit buttons on forms.)
If you choose to do this, we'll ask Kevin to set up a mysql database for you.
Students can do a much more sophisticated version of the code we did to generate web pages; potentially generating them on the fly from a database, or accepting input from a web form.
If you want to output from a database to web pages in an interactive manner, you probably have to use some glue code like JSP or java servlets. Alternatively, you can have your code generate cold fusion code.
Students can interface to a disk-based system using either hash tables or B-trees; I have put together some code that shows you how to do the linking between code by Sleepycat and java.
(1) I have only compiled it to work on a Windows machine -- as currently compiled it will not work under Unix.
(2) This should work as is (no classpath required) if you use the directory structure as I provided it and if you set your PATH environment variable to include the build_win32/Release directory. For example, your PATH variable might look like:
C:\Program Files\JavaSoft\JRE\1.3;C:\Program Files\JavaSoft\JRE\1.3\bin;W:\courses\is255\f01\projects\dbtool\build_win32\Release
If you don't do this, the program will compile, but not run. In NT you right-click on My Computer, then click Properties> Advanced > Environment Variables.
(But you have to make the last part refer to the correct directory.)
One way to use this would be to make the code in the CIA lab much faster. As currently set up, you have to read the code file into a data structure in memory every time you run the program. Using the Sleepycat utilities, you index the codes once, and then every time you use them after that you get fast performance (for reads). (But just linking that lab to the software I've provided is not enough for a project -- I'm just using this example to explain the concept.)
This code can be used as the foundation for a database system or an IR system (Prof. Larson's Cheshire system is built on top of Sleepycat).
Write an interface to a large java open source IR system called Lucene that I have code for.
I have made a
This code includes a file that I wrote called demo/ExamineTerms.java that shows how to go through an index created with demo/IndexFiles.java and print out a word frequency list.
Note that to run this code, it is easiest to make classpath point to the directory that has the com and demo directories in it, and then run code by naming the demo directory explicity. For example: java demo\IndexFiles
(This was Ian's suggestion.) Write the code to really make the Bowl-a-rama game work. It would be best to make an applet that shows some graphical output and accepts input from users.