Tuesday, April 27, 2010

JDBC interview questions

JDBC interview questions

a) OBDC is for Microsoft and JDBC is for Java applications.

b) ODBC can’t be directly used with Java because it uses a C interface.

c) ODBC makes use of pointers which have been removed totally from Java.

d) ODBC mixes simple and advanced features together and has complex options for simple queries. But JDBC is designed to keep things simple while allowing advanced capabilities when required.

e) ODBC requires manual installation of the ODBC driver manager and driver on all client machines. JDBC drivers are written in Java and JDBC code is automatically installable, secure, and portable on all platforms.

f) JDBC API is a natural Java interface and is built on ODBC. JDBC retains some of the basic features of ODBC.


what is the role of Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");


when we call forName() method on Class class what happen is1)initially the class is loaded into the memory2)then it calls the static method forName()3)the static forName() method contains a static block.That static block regiser the loaded driver class with the DriverManager class

No comments:

Post a Comment