wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

JDBC

Total questions: 20

Worksheet time: 12mins

Name
Class
Date
1.

Which of the following tasks are associated with JDBC library?

a)

Making a connection to a database.

b)

Creating SQL or MySQL statements.

c)

Executing SQL or MySQL queries in the database.

d)

All of these

2.

Expand JDBC

(a)  

3.

_____________ interface handles the communications with the database server

a)

DriverManager

b)

Driver

c)

Statement

d)

None of these

4.

___________ interface with all methods for contacting a database.

a)

ResultSet

b)

Statement

c)

Connection

d)

Driver

5.

The third step involved in JDBC application is ____________

a)

Execute Query

b)

Establish Connection

c)

importing packages

d)

Register the Driver

6.

In Type 2 Driver, JDBC API calls are converted into native _____________ API calls, which are unique to the database

a)

C/C++

b)

Java

c)

JavaScript

d)

Visual Programming

7.

Type 4 Driver is also called as (a)  

8.

_____________ driver talks with server-side middleware which then talks to the database

a)

Type 1

b)

Type 2

c)

Type 3

d)

Type 4

9.

(a)   should be imported to use SQL statements

10.

The most common approach to register a driver is to use Java's (a)   method.

11.

To open a connection, DriverManager. (a)   () is to be used.

12.

Which method returns an integer as its result?

a)

execute()

b)

executeUpdate()

c)

executeQuery()

d)

extract()

13.

Which interface will NOT accept input parameters

a)

Statement

b)

PreparedStatement

c)

CallableStatement

d)

PrepareStatement

14.

All parameters in JDBC are represented by the ? symbol, which is known as the (a)   .

15.

in a ResultSet object, the ___________ methods to retrieve the value of a given column.

a)

POST()

b)

GET()

c)

setXXX()

d)

getXXX()

16.

We bind values to _________ parameters with the setXXX methods

a)

OUT

b)

IN

c)

INPUT

d)

OUTPUT

17.

The corresponding SQL type for the boolean JAVA type is_____

a)

BOOLEAN

b)

BIT

c)

BOOL

d)

BYTE

18.

(a)   method returns the total number of columns in the ResultSet object.

19.

_____________interface is used to execute stored procedures.

a)

Statement

b)

PreparedStatement

c)

CallableStatement

d)

execute

20.

(a)   method is used to create an object of the class ResultSetMetaData.