Tuesday, December 15, 2015

JDBC test answers of 2016.

Find Complete and recently updated Correct Question and answers of JDBC. All Answers updated regularly with new questions. Upwork JDBC test answers of 2016.



Question:* JDBC is an API for the _________ programming language.

Answer: • Java

Question:* In order to access Database stored procedures, the best JDBC interface is:

Answer: • CallableStatement

Question:* _______ is not a method of a ResultSet cursor.

Answer: • end

Question:* _______ JDBC driver type(s) can be used in either applet or servlet code.

Answer: • Type 3 and 4

Question:* ________ is NOT a step you must perform to process an SQL statement.

Answer: • Ping the data source.

Question:* A ________ is used to mark intermediate points inside a transaction in order to get a more fine-grained control.

Answer: • savepoint

Question:* True or False? A transaction is closed when close() is called on the Connection object.

Answer: • True

Question:* True or False? JDBC is an API to access relational databases, spreadsheets, and flat files.

Answer: • True

Question:* A ______ object lets you access the data returned by an SQL statement.

Answer: • ResultSet

Question:* True or False? SQLWarning objects are a subclass of SQLException.

Answer: • True

Question:* Which of the following is NOT needed to set up a JDBC Environment:

Answer: • .Net

Question:* In order to commit changes to the database, use:

Answer: • commit

Question:* True or False? JDBC will work with many different database management systems.

Answer: • True

Question:* JDBC stands for _______.

Answer: • Java Database Connectivity

Question:* You must register your JDBC driver in your program before using it? True or False

Answer: • True

Question:* Which package contains the JDBC classes?

Answer: • java.sql

Question:* In order to undo the previous transaction, use

Answer: • rollback

Question:* The most common exception you'll deal with JDBC:

Answer: • SQLException

Question:* If a database operation fails, JDBC raises an:

Answer: • SQLException

Question:* _______ extends the RowSet interface.

Answer: • All of the above

Question:* In the syntax {ts 'yyyy-mm-dd hh:mm:ss'}, ts stands for

Answer: • timestamp

Question:* What kind of database is the command jdbc:mysql:://localhost:3306/ is connecting to?

Answer: • MySQL

Question:* The SQLXML interface provides the _____ method to access its internal content.

Answer: • All of the above

Question:* If the ResultSet type is TYPE_FORWARD_ONLY, it implies:

Answer: • the cursor can move forward in the result set

Question:* ______ is NOT a valid parameter mode for a stored procedure.

Answer: • CONSTANT

Question:* In order to accept input parameters at runtime, use the following JDBC interface:

Answer: • PreparedStatement

Question:* The Class.forname() method is used to:

Answer: • register the jdbc driver

Question:* If the column you are interested in viewing contains an int, which of the following methods of Resultset can be used?

Answer: • getInt()

Question:* {fn length('Friday')} will return

Answer: • 6

Question:* Which of the following in not required by the getConnection() method to create a connecton object?

Answer: • Website url

Question:* At the end of the JDBC program, it is explicity required to close al the connections to the database? True or False

Answer: • True

Question:* True or False? If executing a Statement object many times, a PreparedStement object will reduce execution time.

Answer: • True

Question:* When a Driver Class is loaded, it creates an instance of itself and registers it with:

Answer: • DriverManager

Question:* ________ is an object used for precompiling SQL statements that may contain input parameters.

Answer: • Prepared Statement

Question:* True or False? The RowSet object holds data in a tabular form that is more flexible and easier to use than the ResultSet object.

Answer: • True

Question:* In the command jdbc:derby:testdb;create=true, testdb stands for

Answer: • Database name

Question:* True or False? The default mode when a connection is created is auto-commit mode.

Answer: • True

Question:* The ______ packages contain the JDBC classes.

Answer: • java.sql and javax.sql

Question:* JDBC API uses which drivers to connect to the database?

Answer: • jdbc

Question:* Autocommit must be set to false when using batch processing with Statement object? True or Flase

Answer: • True

Question:* All JDBC Rowset objects are derived from which interface?

Answer: • ResultSet

Question:* boolean execute (String SQL) returns:

Answer: • boolean value of true if a resultset object can be retrieved

Question:* To close existing database connections, you should call

Answer: • close() method

Question:* The executeUpdate method from Statement returns:

Answer: • an integer representing the number of rows affected by the SQL statement

Question:* To jump back to a specific point in the program, create a:

Answer: • Savepoint

Question:* Which of the following is not an overloaded DriverManager.getConnection () method?

Answer: • getConnections()

Question:* _______ driver type(s) are for use over communication networks.

Answer: • Type 3 and 4

Question:* A ______ is not contained in an SQLException.

Answer: • effect

Question:* True or False? JDBC is an API to connect object and XML data sources.

Answer: • False

Question:* A _______ is used to access the data in a ResultSet.

Answer: • cursor

Question:* _____ will create a RowSet object.

Answer: • All of the above

Question:* public void updateString(int columnIndex, String s) throws SQLException

Answer: • Changes the String in the specified column specified by its index to the value of s

Question:* The _______ method adds SQL commands to the list associated with a Statement object.

Answer: • addBatch

Question:* _______ driver type(s) can be used in a three-tier architecture and if the web server and DBMS are running on the same machine.

Answer: • Type 1, 2, 3, and 4

Question:* Which of the following parameters is used by the Preparedstatement object?

Answer: • IN

Question:* _______ driver type is the JDBC-ODBC bridge?

Answer: • Type 1

Question:* While accessing databses such as Oracle, Sybase or IBM, the preferred driver type is:

Answer: • Type 4: 100% Pure Java

Question:* If you are going to use Static SQL statements at runtime, the best JDBC interface to use is:

Answer: • Statememt

Question:* Transaction_read_committed (one example of transaction isolation level) does not alow:

Answer: • Dirty reads

Question:* Which object has the ability to use input and output streams to supply parameter data?

Answer: • PreparedStatement

Question:* _______ is not a valid ResultSet type.

Answer: • TYPE_BACKWARD_ONLY

Question:* A ________ is a subclass of SQLException.

Answer: • SQLWarning

Question:* Which driver type is best suited for development and testing purpose?

Answer: • Type 1: JDBC-ODBC Driver Bridge

Question:* The DATALINK SQL data type maps to the JDBC _____ object.

Answer: • java.net.URL

Question:* A _______ is a set of one or more statements that is executed as a unit.

Answer: • transaction

Question:* True or False? After fetching an instance of the Connection object, a live connection must first be established before making queries to the database.

Answer: • False

Question:* _______ is NOT a valid example of a transaction isolation level.

Answer: • TRANSACTION_REPEATABLE_COMMIT

Question:* The _______ of a ResultSet object determines what level of update functionality is supported.

Answer: • concurrency

Question:* True or False? MySQL and Java DB support the ARRAY SQL data type.

Answer: • False

Question:* ______ is NOT a subclass of SQLException

Answer: • SQLFailureException

Question:* True or False? Applications may release Blob, Clob, and NClob resources by invoking their release method.

Answer: • False

Question:* For storing file into the database, which datatype is used in table?

Answer: • CLOB

Question:* Which of the following is not an Advanced Data type in JDBC API?

Answer: • varbinary (max)

Question:* True or False? The list associated with a Statement object may contain a statement that produces a ResultSet object.

Answer: • False

Question:* If your Java aplication is accessing multiple databases at the same time, the preferred driver type is:

Answer: • Type 3: JDBC-Net pure Java

Question:* Resources used by Blob, Clob an NClob Java objects can be released by using which method?

Answer: • free

Question:* General SQL escape syntax format is:

Answer: • {keyword 'parameters'}

Question:* True or False? A transaction is finished when commit() or rollback() is called on the Transaction object.

Answer: • False

Question:* A ______ RowSet object makes a connection to a data source only to read or write data based on a ResultSet object.

Answer: • disconnected



No comments:

HTML5 Upwork (oDesk) TEST ANSWERS 2022

HTML5 Upwork (oDesk) TEST ANSWERS 2022 Question: Which of the following is the best method to detect HTML5 Canvas support in web br...

Disqus for upwork test answers