FHTW Berlin

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


Exercise 11: Java does Databases: JDBC I

 

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 email box of your instructor by 8.00 next Wednesday. Do not forget to put your names on the top of the report! It is also a good idea put the number of the exercise somewhere in the title of your report.... When you send the URL of the report to your instructor, always include your partner in the CC. That way we don't get either 2 emails or none, because each or your thought the other was sending it. This has the added advantage that when we answer you, we can immediately answer both of you without having to look up the email account of your partner.


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