DB Unit 5 AJP Assognment
DB Unit 5 AJP Assognment
3. How many steps are used to connect any java application with the database using
JDBC ? (a) 5 (b) 4 (c) 3 (d) 6
7. Which kind of driver converts JDBC calls into calls on the Client API for Oracle, Sybase, Informix, IBM DB2, or other DBMS
(a) JDBC ODBC bridge + ODBC Driver (b) Native API partly ñ Java Driver
(c) JDBC ñ Net pure Java Driver (d) Native Protocol Pure Java Driver
8. Which method executes an SQL statement that may return multiple results?
(a) executeUpdate( ) (b) executeQuery( ) (c) execute( ) (d) noExecute( )
11. Which of the following function is used to find the column count of the particular ResultSet.
(a) getMetadata( ) (b) metadata( ) (c) getColumnCount( ) (d) getCount( )
12. In JDBC imports all Java classes that are concern with Database connectivity.
(a) javax.sql (b) java.mysql (c) java.sql (d) com.sql
13. The package contains classes that help in connecting to a database, sending SQL statements to the database and
process the query request.
(a) connection.sql (b) db.sql (c) pkg.sql (d) java.sql
16. In the below statement, which type of query can be used with executeUpdate( ) method. statement.executeUpdate(query here)
(a) Insert, Update, Delete (b) Insert, Select, Delete (c) Only Select (d) Any Query
18. Native – protocol pure Java Driver converts into the directly.
(a) JDBC calls, network protocol (b) ODBC class, network protocol
(c) ODBC class, user calls (d) JDBC calls, user calls
24. The JDBC‐ODBC bridge supports how many concurrent open statements per connection ?
(a) 1 (b) 0 (c) Does not support conection (d) None of these
27. Which of the following method is used for send SQL statements?
(a) Statement (b) CallableStatement (c) PreparedStatement (d) Both B & C
33. The syntax to create a table named “Course”, should begin with .
(a) create new table course (b) create table course (c) table course create (d) new table course
40. Which of the following is used to limit the number of rows returned?
a) setMaxRows(int i) b) setMinRows(int I) c) getMaxrows(int i) d) getMinRows(int i)
45. The syntax to create a table named ìCourseî, should begin with .
(a) create new table course (b) create table course
(c) table course create (d) new table course
a) i, ii, iii, v, iv, vii, viii, vi b) i, iii, ii, v, iv, vii, vi, viii c)ii, i, iii, iv, viii, vii, v, vi d)i, iii, ii, iv, v, vi, vii, viii
50. Which of the following method is used to perform DML statements in JDBC?
a) executeResult() b) executeQuery() c) executeUpdate() d) execute()
51. How many transaction isolation levels provide the JDBC through the Connection
interface? a) 3 b) 4 c) 7 d) 2
52. Which of the following method is static and synchronized in JDBC API?
a) getConnection() b)prepareCall() c) executeUpdate() d)executeQuery()
60. Which type of ResultSet allows changes made in the ResultSet to be reflected in the database?
a) ResultSet.TYPE_FORWARD_ONLY b) ResultSet.TYPE_SCROLL_INSENSITIVE
c) ResultSet.TYPE_SCROLL_SENSITIVE d) ResultSet.TYPE_UPDATABLE
61. . Which method is used to retrieve the SQL warning associated with a JDBC Connection?
a) getWarning() b) fetchWarning( ) c) retrieveWarning() d) obtainWarning()
62. Which method is used to retrieve the auto-generated keys after an INSERT operation, but only for specific columns?
a) getGeneratedKeys() b) fetchGeneratedKeys() c) retrieveGeneratedKeys() d) obtainGeneratedKeys()
63. In JDBC, which interface provides methods to work with large binary data, such as images or files, stored in a database?
a) java.sql.Clob b) java.sql.Blob c) java.sql.BinData d) java.sql.LargeData