You are on page 1of 1

class DriverManager

public static Connection getConnection(-,-,-)


{

//implementation logic for connecting to the Database is there

class MyJdbc
{

public static void main(String args[])


{

//need to load the driver class

//why to load the driver


//DriverManager object will be registered the driver and before getting connected
to the Data base it will check whether the Driver is register or not.

//how many types of drivers are there in java


//4 types of drivers

//4th type of driver i,e thin driver(oracle.jdbc.driver.OracleDriver)

//which type of driver we are loading i,e whether is it oracle or mysql etc.....

this is the way to get connected to the DB from java app.

// Connection con= DriverManager.getConnection(-,-,-);

how many types of statemnets are there in jdbc?


there are three types are there
1)Statement(Interface)
2)preparedStatement(Interface)
3)CallableStatement(Interface)

You might also like