JDBC is a specification, it acts as a vehicle for exchanging SQL statements
between Java application and the database. JDBC API follows two packages
1. java.sql (JDBC Core API)
2. javax.sql (JDBC Ext API)
There are four types of drivers
1. JDBC-ODBC BridgeDriver
2. Native-API partly Java Driver
3. JDBC-Net-protocol Java Driver
4. Native-protocol Java Driver
Type 3,4 are pure Java drivers
Type 1 is common drivers
Type 1,3 data independent drivers
Type 2,4 are data base dependent
Type 1 : Driver is does not connect normal database its only connect RDBMS
system only
java application--->Bridge Driver-------->any database
Drawbacks:
1. We are try to connect our database its not connect java program to database
2. JDBC is normal program (non pointer). our ODBC is implemented pointer
concept. that is why internal conversion means pointer to non pointer takes
place
3. Its very slow compare to all
4. We need to install client libraries from db system into client system
JDBC driver class Name: sun.Jdbc.Odbc.JdbcOdbc Driver
Jdbc URL: Jdbc:Odbc:
Type 4: is Native - Protocol it is pure java Driver
javaApplication---->type4 Driver-------->single DataBase
This driver will use the database prorocol in order to connect database
directly driver does not connect any connection in middle .so it is Fast
compared to all It is two tier Architecture
Type 4 driver class Name: Oracle.Jdbc.driver.OracleDriver
Type4 Driver URL: Jdbc:Oracle:thin:@localhost:number:
From
konnipati.sivakumar