Re: [gtk-list] Re: GNOME Database kit ODBC interface

On Fri, Aug 07, 1998 at 02:43:20AM -0400, Elliot Lee wrote:
> On Fri, 7 Aug 1998, Ian McKellar wrote:
> > Having read the JDBC book and having spoken to people who've had to use it
> > it sounds pretty horrific.
> I don't do Java :) How does JDBC compare to ODBC?

JDBC is a fairly straightforward OO wrapper around OBDC or CLI.  After
all, there are aren't that many different ways one can write a
low-level RDBMS interface, so you tend to get convergent evolution.
You have to have some kind of result-set/cursor object, a way to
discover the columns in a resultset, a way to execute queries, and so

JDBC suffers the usual problems about different databases
understanding slightly different SQL dialects.

There are higher-level ways to get to RDBMS data (e.g. Java Blend),
but AFAIK they build on JDBC.  (It's vaguely analogous to GNOME on top
of GTK+).

One of the nicest improvements of JDBC over C-based APIs (IMHO) is
that errors are handled using Java exceptions, so you don't have to
check explicitly on every call.

> Is JDBC a wire protocol or a Java database API?

JDBC is an abstract Java API: database or middleware vendors provide
concrete implementations for their database, and there's a URL-based
means to dynamically load the right driver on demand.

> >   * JDBC is emering as an industry standard :)
> "emerging" != "is"

Well, everybody wants to talk to Java, so most people implement it.
But it's not a very profound improvement: almost all databases provide
a CLI-like interface anyhow.

Implementing a similar wrapper set in CORBA would be good, if there's
not already such a thing.  Going from a native database via Java back
to native code seems a bit bad.

Hope that helps.

Martin Pool

PGP signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]