Programming Hints

Before you start programming, you should:

Comparison between Java and C/C++ in database programming:

JavaC/C++
Program length:shorterlonger
Similarity between Oracle
and PostgreSQL programs:
similarquite different
Running time:slower (not important in homeworks)faster
Server side support:limitedcan use more functions
In general, I suggest you use the language you DON'T KNOW much. For example, if you have experience in JDBC, then don't use it. You will learn more from the homeworks/projects.

Other hints:

  1. Start earlier. Usually, at the last minute, I am not joking. The events above really will happen and often occur together.
  2. Read manual/reference. There are a lot of information in the reference.
  3. Connect and disconnect to the DBMS for every task. If you keep the connection inactive for a long time, DBMS may drop it.
  4. Remember to kill the connections and processes each time you run your program.
  5. Reuse the codes, making function calls instead of copy & paste codes.
  6. SQL statements in PostgreSQL and Oracle may be different for the same problem.
  7. Test your program by the sample input/output. You will get the basic marks (~50%) if you can handle sample input/output correctly.
  8. In case you do not have time to finish all parts of the homework, try to make some parts completely working. So that I can test it and give you marks. For example, suppose there are 10 functions required by a homework. The marks for 3 complete working functions will be higher than 10 half or not working functions.