Set - 1

Question 21 :

Which type of JDBC driver is the fastest one?

Answer :

JDBC Net pure Java driver(Type IV) is the fastest driver because it converts the jdbc calls into vendor specific protocol calls and it directly interacts with the database.


Question 22 :

Are all the required JDBC drivers to establish connectivity to my database part of the JDK?

Answer :

No. There aren't any JDBC technology-enabled drivers bundled with the JDK 1.1.x or Java 2 Platform releases other than the JDBC-ODBC Bridge. So, developers need to get a driver and install it before they can connect to a database. We are considering bundling JDBC technology- enabled drivers in the future.


Question 23 :

Is the JDBC-ODBC Bridge multi-threaded?

Answer :

No. The JDBC-ODBC Bridge does not support concurrent access from different threads. The JDBC-ODBC Bridge uses synchronized methods to serialize all of the calls that it makes to ODBC. Multi-threaded Java programs may use the Bridge, but they won't get the advantages of multi-threading. In addition, deadlocks can occur between locks held in the database and the semaphore used by the Bridge. We are thinking about removing the synchronized methods in the future. They were added originally to make things simple for folks writing Java programs that use a single-threaded ODBC driver.


Question 24 :

Does the JDBC-ODBC Bridge support multiple concurrent open statements per connection?

Answer :

No. You can open only one Statement object per connection when you are using the JDBC-ODBC Bridge.


Question 25 :

What is the query used to display all tables names in SQL Server (Query analyzer)?

Answer :

select * from information_schema.tables