Font size
WorksheetsJDBC
Total questions: 20
Worksheet time: 12mins
Which of the following tasks are associated with JDBC library?
Making a connection to a database.
Creating SQL or MySQL statements.
Executing SQL or MySQL queries in the database.
All of these
Expand JDBC
(a)
_____________ interface handles the communications with the database server
DriverManager
Driver
Statement
None of these
___________ interface with all methods for contacting a database.
ResultSet
Statement
Connection
Driver
The third step involved in JDBC application is ____________
Execute Query
Establish Connection
importing packages
Register the Driver
In Type 2 Driver, JDBC API calls are converted into native _____________ API calls, which are unique to the database
C/C++
Java
JavaScript
Visual Programming
Type 4 Driver is also called as (a)
_____________ driver talks with server-side middleware which then talks to the database
Type 1
Type 2
Type 3
Type 4
(a) should be imported to use SQL statements
The most common approach to register a driver is to use Java's (a) method.
To open a connection, DriverManager. (a) () is to be used.
Which method returns an integer as its result?
execute()
executeUpdate()
executeQuery()
extract()
Which interface will NOT accept input parameters
Statement
PreparedStatement
CallableStatement
PrepareStatement
All parameters in JDBC are represented by the ? symbol, which is known as the (a) .
in a ResultSet object, the ___________ methods to retrieve the value of a given column.
POST()
GET()
setXXX()
getXXX()
We bind values to _________ parameters with the setXXX methods
OUT
IN
INPUT
OUTPUT
The corresponding SQL type for the boolean JAVA type is_____
BOOLEAN
BIT
BOOL
BYTE
(a) method returns the total number of columns in the ResultSet object.
_____________interface is used to execute stored procedures.
Statement
PreparedStatement
CallableStatement
execute
(a) method is used to create an object of the class ResultSetMetaData.
