FHTW Berlin

FB 4
Internationale Media and Computing
MeSoII: Media Software II
Sommersemester 2002


Exercise 13: Java does Databases: JDBC I

You have all done such excellent work this semester, that I have decided to drop the last exercise. (Do I hear cheering in the background?). I will grade on your results for 14 exercises, dropping the worst grade. So 130 points will be the number of points needed for a 1,0. Check out the grading scale, I've calculated the points for you. If you desparately need more points, do the JGuru exercise on JavaBeans and send me a report on it by Thursday, July 25, 12.00 and I will count the points in addition. Brownie points will be added to your score if you are between grades (i.e. miss the higher grade by one point).

The tutorial for today is a MageLang/JGuru tutorial again that assumes that you know about relational databases and SQL. I *know* that you had this with Prof. Sieck many moons ago, so this should jog your memory. There is still the Oracle database for IMI that runs at the computer center. You can also try Access, if you have it, or mySQL.

  1. Start reading the introduction to JDBC and the example database on Coffee Consumption at Cafe Jolt, MageLang University. Review the complete code given in the link. Where is the database being stored?
  2. Do exercise 1, "Getting Started"
  3. Do exercise 2, "Using JDBCTest"
  4. Do exercise 3, "Connecting to an ODBC datasource without JDBCTest"
  5. The numbering is all goofed up, now try the "Selecting" exercise, numbered "1".
  6. Next week we will do the exercises "MetaData" and "Command Line Guest Book". The bored can go on and do the SQL exception handling exercise.

It would be great if you manage to get to the Selecting exercise this week, and do the others next week. But if you have spent sufficient time and aren't there yet, leave this to next week. If you are exceedingly bored and finish all the DB exercises this week, you can go on and do Beans on your own next week for extra credit!


The URL to your report, which will describe what you did during the exercise and include links to your code, is due in my email box on time. This means Tuesday at 8.00 for Group 1 and Thursday at 12.00 for Group 2. Do not forget to put your names on the report! When you send the URL to me, include your partner in the CC. That way I don't get either 2 emails or none, while each thought the other was doing it. And when I answer you, I can immediately answer both of you without having to look up your preferred email account.


Debora Weber-Wulff (weberwu@fhtw-berlin.de)