Professional Documents
Culture Documents
Question 1 of 20
A ________ object is used to submit a query to a database. ? 5.0/ 5.0 Points
A. dataset
B. Statement.
C. Connection.
D. java.sql
Question 2 of 20
What statements are correct about batched insert and updates? (2 correct answers) 0.0/ 5.0 Points
A. To execute a batched update/insert, you call the executeBatch() method on a Statement object
B. To create a batch of insert and update statements, you create an object of type Batch, and call the
method addStatement(String statement) for each statement you want to execute in the batch
C. To do a batched update/insert, you call addBatch(String statement) on a Statement object for each
statement you want to execute in the batch
D. Batch insert and updates are only possible when making use of parameterized queries.
Question 3 of 20
Which of the following methods are needed for loading a database driver in JDBC 5.0/ 5.0 Points
A. registerDriver() method
B. getConnection()
C. Class.forName()
D. Both A and B
Question 4 of 20
The JDBC-ODBC bridge is 5.0/ 5.0 Points
A. Three tiered
B. Multithreaded
Question 5 of 20
Which java.sql class provides the getConnection() method? 5.0/ 5.0 Points
A. ResultSet 71
B. DriverManager
C. Connection
D. Driver
Question 6 of 20
What is the meaning of the transaction isolation level TRANSACTION_REPEATABLE_READ 0.0/ 5.0 Points
A. Dirty reads are prevented; non-repeatable reads and phantom reads can occur
D. Dirty reads and non-repeatable reads are prevented; phantom reads can occur
Question 7 of 20
Which driver is efficient and always preferable for using JDBC applications 5.0/ 5.0 Points
A. Type – 1
B. Type – 4
C. Type – 2
D. Type – 3
Question 8 of 20
What statements are correct about JDBC transactions (2 correct answers)? 0.0/ 5.0 Points
Question 9 of 20
The different types of JDBC driver are 3.33/ 5.0 Points
Question 10 of 20
Which of the following methods finds the maximum number of connections that a specific driver 5.0/ 5.0 Points
can obtain
A. ResultSetMetaData.getMaxConnections
B. DatabaseMetaData.getMaxConnections
C. Connection.getMaxConnections
D. Database.getMaxConnections
Question 11 of 20
A JDBC application does the following in what order of steps? 5.0/ 5.0 Points
i) Connects to a JDBC data source
ii) Parses the results of the query
iii)Executes a query
iv) closes the connection after the database operation
A. i-ii-iii-iv
B. iv-iii-ii-i
C. ii-iii-iv-i
D. i-iii-ii-iv
Question 12 of 20
The column index of ResultSet object is numbered from _________ 5.0/ 5.0 Points
A. No
B. Yes
Question 13 of 20
You need a ____ to access a database from a Java program. ? 5.0/ 5.0 Points
A. Servlet
B. Connection
C. ResultSet
D. JDBC
Question 14 of 20
The methods of what type of object can be used to move the cursor through a result set? ? 0.0/ 5.0 Points
A. Connection
B. URL
C. ResultSet
D. Statement
Question 15 of 20
After a SELECT statement, a _________ is a logical table that's created temporarily within the 0.0/ 5.0 Points
database. ?
A. recordset
B. result set
C. datareader
D. dataset
Question 16 of 20
Conn = Driver Manager.getConnection(“jdbc:odbc:Employee”,“”,“”); 5.0/ 5.0 Points
What does the above statement do?
Question 17 of 20
What is type-1 of JDBC drivers 5.0/ 5.0 Points
Question 18 of 20
How can you start a database transaction in the database 5.0/ 5.0 Points
A.
By setting the autoCommit property of the Connection to false, and execute a statement in the database
B. By asking a Transaction object to your Connection, and calling the method begin() on it
C.
By asking a Transaction object to your Connection, and setting the autoCommit property of the
Transaction to false
Question 19 of 20
What statements are correct about positioned updates (i.e. cursor updates) in ResultSets 5.0/ 5.0 Points
B. Only scrollable updateable ResultSets can use this approach to change the data in the current row of a
ResultSet
C. Using the cursor technique is currently the only possible way to change the data in the current row of a
ResultSet
D. The name of the cursor is specified by the setCursorName(String name) method the Statement object.
Question 20 of 20
What is, in terms of JDBC, a DataSource 5.0/ 5.0 Points
Gateway
Accessibility Information
The Sakai Project
Powered by Sakai
Copyright 2017 FPT-Software