Meaningless Drivel is fun!*
The moose likes JDBC and the fly likes JDBC vs C++ Native libraries Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC vs C++ Native libraries" Watch "JDBC vs C++ Native libraries" New topic
Author

JDBC vs C++ Native libraries

Andrea Cacciarru
Greenhorn

Joined: Feb 09, 2006
Posts: 2
I know that with JDBC I can use directly specific db drivers, provided by the db manufacturer. How can I do this? There is any disadvantage to use Java JDBC instead C++ native libraries (e.g. performances)?

Bye
Andrea
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30146
    
150

Originally posted by Andrea Cacciarru:
I know that with JDBC I can use directly specific db drivers, provided by the db manufacturer. How can I do this? There is any disadvantage to use Java JDBC instead C++ native libraries (e.g. performances)?

Andrea,
These aren't mutually exclusive. You can use a native library driver with JDBC.

Welcome to JavaRanch!


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
stu derby
Ranch Hand

Joined: Dec 15, 2005
Posts: 333
Originally posted by Andrea Cacciarru:
There is any disadvantage to use Java JDBC instead C++ native libraries (e.g. performances)?

Depends on the database, and possibly where the application is running relative to the database, and maybe other things.

For example, if you're using Oracle, and if your Java application is running on the database server (and nowhere else), and if you use the OCI driver (a C++ library with a Java wrapper) and if you connect to the database using IPC instead of TCP (assuming your DB's OS supports IPC), then and only then
will your application be significantly faster, by eliminating a lot of networking-related overhead. (IPC is "inter-process communication). However, most people can't put their apps on the database server. For them, for Oracle, as of Oracle 9i the native driver isn't significantly faster than the pure Java driver, at least in common usage.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC vs C++ Native libraries
 
Similar Threads
how to use c/cpp code in java??
Use of Pocket PC hardware keys
Invoke Java library from C/C++
How to read data from excel file and store it in the database ?
JDBC Driver for Oracle RDB