Q.1
Which JDBC driver Type(s) can you use in a three-tier architecture and if the Web server and the DBMS are running on the same machine?
  • Type 1 only
  • Type 2 only
  • Both Type 3 and Type 4 only
  • All of Type 1, Type 2, Type 3 and Type 4
Q.2
When the message "No Suitable Driver" occurs?
  • When the driver is not registered by Class.forname() method
  • When the JDBC database URL passed is not constructed properly
  • When the type 4 driver is used
  • When the user name, password and the database does not match
Q.3
Which of the following is an advantage of using PreparedStatement in Java?
  • memory usage is less
  • Prevents SQL injection
  • Works fast with large data
  • Estimates data types
Q.4
Which class/interface manages a list of database drivers?
  • Driver
  • DriverManager
  • ManageDriver
  • DriverCon
Q.5
"If we change the Database we have to change the native api as it is specific to a database". The above statement resembles ______ driver.
  • Type 1
  • Type 2
  • Type 3
  • None
Q.6
The class Class is available in _______ package
  • java.lang
  • java.util
  • java.io
  • java.sql
Q.7
DriverManager is available in _______ package
  • java.io
  • java.lang
  • java.util
  • java.sql
Q.8
Are prepared statements actually compiled?
  • Yes, they compiled
  • No, they are bound by the JDBC driver
Q.9
Which of the following methods are needed for loading a database driver in JDBC?
  • registerDriver()
  • Class.forName()
  • Both A and B
  • getConnection()
Q.10
Which type of driver provides JDBC access via one or more ODBC drivers?
  • Type 1 driver
  • Type 2 driver
  • Type 3 driver
  • Type 4 driver
0 h : 0 m : 1 s