Advanced Java Programming (3160707) MCQs

MCQs of JDBC Programming

Showing 1 to 10 out of 45 Questions
1.
_________ ensures that the correct driver is used to access each data source.
(a) java.sql.Connection
(b) java.sql.DriverManager
(c) java.sql.Statement
(d) java.sql.Driver
Answer:

Option (b)

2.
Which driver translates JDBC calls into ODBC calls and use Windows ODBC built in drivers.
(a) Type-1
(b) Type-2
(c) Type-3
(d) All of these
Answer:

Option (a)

3.
Which statement is NOT true for Type 1 (JDBC-ODBC Driver)
(a) Allow to communicate with all database supported by ODBC driver
(b) ODBC client library to be installed in every client machine
(c) This driver supports all java applications except applets.
(d) it is vendor independent driver
Answer:

Option (c)

4.
Pure java driver which can interface with multiple database.
(a) Type-1
(b) Type-2
(c) Type-3
(d) None of these
Answer:

Option (c)

5.
_________ Driver is extremely flexible, since it requires no code installed on the client machine.
(a) JDBC-ODBC Driver
(b) Native Code Driver
(c) Java Protocol
(d) Database Protocol
Answer:

Option (c)

6.
The following driver is/are portable.
(a) Type-3
(b) Type-4
(c) Type-2
(d) both A&B
Answer:

Option (d)

7.
Which driver support multiple database.
(a) Type-1 & Type-3
(b) Type-1 & Type-2
(c) Type-3 & Type-4
(d) Type-2 & Type-3
Answer:

Option (a)

8.
Which driver is not considered a deployment-level driver?
(a) Type-1
(b) Type-2
(c) Both A&B
(d) None of these
Answer:

Option (a)

9.
__________ Interface is used for general-purpose access to your database, when using static SQL statements at runtime.
(a) java.sql.Statement
(b) java.sql.PreparedStatement
(c) java.sql.CallableStatement
(d) java.sql.DbStatement
Answer:

Option (a)

10.
__________ represents a precompiled SQL statement.
(a) java.sql.Statement
(b) java.sql.PreparedStatement
(c) java.sql.CallableStatement
(d) java.sql.DbStatement
Answer:

Option (b)

Showing 1 to 10 out of 45 Questions