Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

under the hood

0 views
Skip to first unread message

Roedy Green

unread,
Oct 23, 2009, 9:08:48 PM10/23/09
to
I wonder why code to hook up a via JDBC is so complicated. There are
many variants, and it takes multiple calls.

Naively, I would have thought all you would need is a call to a
connect method that took the name of the driver, the user, password
and database name. The driver would implement some standard interface.

What is it about JDBC drivers that makes them so varied?
--
Roedy Green Canadian Mind Products
http://mindprod.com

Nothing is so good as it seems beforehand.
~ George Eliot (born: 1819-11-22 died: 1880-12-22 at age: 61) (Mary Ann Evans)

Arne Vajhøj

unread,
Oct 23, 2009, 10:15:06 PM10/23/09
to
Roedy Green wrote:
> I wonder why code to hook up a via JDBC is so complicated. There are
> many variants, and it takes multiple calls.
>
> Naively, I would have thought all you would need is a call to a
> connect method that took the name of the driver, the user, password
> and database name. The driver would implement some standard interface.
>
> What is it about JDBC drivers that makes them so varied?

Actually direct JDBC is rather simple.

You register a driver (by loading the class - the class has
a static initializer that does all the work).

And then you request a connection matching a certain URL and
username/password.

You only register the driver once but request a connection 2, 2000
or 2 million times.

Arne


0 new messages