File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Type 3 vs Type 4 Drivers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Type 3 vs Type 4 Drivers" Watch "Type 3 vs Type 4 Drivers" New topic

Type 3 vs Type 4 Drivers

Aleena Rehman
Ranch Hand

Joined: Sep 20, 2005
Posts: 66
Dear JDBC Gurus,

Can somebody please explain what are the benefits of Type-3 driver over Type-4 driver ? I was having a discussion with one of our customers and he was considering the gateway(MiddleWare) in Type-3 as an additional layer of security, as clients donot talk directly to the db server ?

I am looking for some counter argument and if possible some reference material that can help ?

[edited out e-mail: ]]
[ February 11, 2007: Message edited by: Jeanne Boyarsky ]

Aleena Rehman<br />SCJP, SCBCD 95%, SCWCD 85%, IBM-OOAD 84%, SCEA-I 91%
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3753

With the risk of being flamed, I find Wikipedia has a decent discussion of the driver levels:

I tend to not worry about the level unless there's a problem with a specific driver. All and all I think the only database it mattered was with oracle and the performance differences were almost non-existent.

[OCA 8 Book] [Blog]
Aleena Rehman
Ranch Hand

Joined: Sep 20, 2005
Posts: 66
Thanks for your response, however it probably does not answer my question. I have already gone through Wikipedia's definition of Type-3, but my question is weather type-3 is more/less secure. Does it in any way affect security ?

Philip Shanks
Ranch Hand

Joined: Oct 15, 2002
Posts: 189
I see little difference from a security perspective. The primary difference is whether the generic JDBC call is translated to the vendor specific call on the client or on the server. The client, server and data stream are all equally vulnerable in either case.

I think that the layered security approach will be the same regardless of which JDBC driver type is chosen. You will want to limit which clients the DB server will accept connections from, use encrypted connections wherever possible, adequate authentication and strong access policies.

Philip Shanks, SCJP - Castro Valley, CA
My boss never outsources or has lay-offs, and He's always hiring. I work for Jesus! Prepare your resume!
I agree. Here's the link:
subject: Type 3 vs Type 4 Drivers
It's not a secret anymore!