Re: how to practice JDBC programming?



Leo wrote:
Dear All,

I am reading a book to learn JDBC. I hope to have hands on practice. But it seems requires database installed, etc. I do have a Oracle expression version installed in my Window XP. But I have never used it.

Do I need to learn Oracle first? Like creating tables, etc. Then I may start to practice JDBC. It seems the learning curve is too long. Any other straight ways to learn it?


No, not really. It's like you really, really want to learn to drive a car, but without really have to ever get inside one.

Oracle is one of the top database systems out there, and Oracle XE is supposed to be very, very easy to use. It has a web interface for administration, so it's very easy to create tables, schemas and stuff. If I'm not mistaken, a sample schema is also installed, (maybe it's an install-option), and for practicing purposes, like jdbc training, it'd be very convenient.

That said, there exist simpler and smaller databases than Oracle, like HSQLDB, written entirely in Java, or PostgreSQL and MySQL which both have administration tools letting you create tables without using SQL create statements.

The easiest way would probably be to create the database in MS Access, if it is familiar to you, and use the odbc-jdbc bridge included in the JDK to access it. This is far from what I'd recommend for any real application, but for training purposes it'd work just fine.

Finally, JDBC isn't an abstraction layer on top of SQL, so basically you can't do much in JDBC, except making the db connection, if you don't know how to do it in SQL first. Answering your question "Do I need to learn Oracle?" I'd say you don't have to learn Oralce, but if you're not comfortable with SQL you should learn that first. And it's much better to get the basic SQL knowledge interacting with the dababase directly, rather than through JDBC, so that you always know that errors stem form the database and don't have to figure out if it's jdbc-related or database-related.
.



Relevant Pages

  • Re: Problem with SQLLoader Date columns and JDBC access
    ... Oracle 9i database. ... note that the column in the database is defined as DATE not as TIMESTAMP. ... But when I try to access this column via JDBC using getTimestampthe ... substr function. ...
    (comp.databases.oracle.misc)
  • Problem with SQLLoader Date columns and JDBC access
    ... I'm importing a text file using SQLLoader into an Oracle 9i database. ... But when I try to access this column via JDBC using getTimestampthe driver throws an IllegalArgumentException ) ... I tried the JDBC driver for Oracle9, 10gR1 and 10gR2, no difference. ...
    (comp.databases.oracle.misc)
  • Re: how to practice JDBC programming?
    ... I hope to have hands on practice. ... Do I need to learn Oracle first? ... Oracle is one of the top database systems out there, ... install-option), and for practicing purposes, like jdbc training, it'd ...
    (comp.lang.java.programmer)
  • Re: How to query a Date Column in SQL
    ... > I am in the process of refactoring a Java application which uses JDBC ... > to talk to Oracle and MySQL. ... > field that was represented in the database as a text field, ... MySQL JDBC drivers will support the escape sequence. ...
    (comp.lang.java.databases)
  • Re: OO vs. RDB challenge
    ... AbstractInfo getInformation; // if you want more adventure. ... XML, database, file version or whatever you need. ... getInformationmaps to ResultSet's next in JDBC. ... Do you know if I can tie an Oracle table to a text file? ...
    (comp.object)