wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

AJP Vidyalankar Polytechnic CHP 5 Part 3

Total questions: 48

Worksheet time: 24mins

Name
Class
Date
1.

For execution of INSERT SQL query in JDBC, ............. method must be used.

a)

executeUpdate()

b)

executeStatement()

c)

executeQuery()

d)

Execute()

2.

For execution of SELECT SQL query in JDBC, _________________ method must be used.

a)

executeQuery()

b)

Execute()

c)

executeUpdate()

d)

executeAll()

3.

forName is a _______________________ type method

a)

Static

b)

Dynamic

4.

getConnection() method is of which class

a)

DriverManager

b)

Statement

c)

Connection

d)

None of above

5.

How many JDBC driver types are available by sun Microsystem?

a)

6

b)

4

c)

5

d)

3

6.

If a PreparedStatement is a SQL SELECT statement, you execute the statement using ________.

a)

PreparedStatement.execute();

b)

Statement.executeQuery();

c)

PreparedStatement.executeQuery();

d)

PreparedStatement.executeUpdate();

7.

If you need to use a stored procedure with output parameters, which of the following statement type should be used to call the procedure?

a)

CallableStatement

b)

PreparedStatement

c)

Statement

d)

ProcedureStatement

8.

In 2-tier architecture, the first tier is generally ___________________

a)

GUI

b)

Server

c)

Client

d)

database

9.

In the following JDBC drivers which is known as partly java driver?

a)

Pure-Java Driver

b)

JDBC-net Pure Java

c)

JDBC driver

d)

Native-API driver

10.

In the three-tier model the middle tier of the services acts as a mediator between ________________________ and _________________.

a)

Java application and databases

b)

Client and Server

c)

Java application and client

d)

Java application and server

11.

JDBC is a --------------------- interface, which means that it is used to invoke SQL commands directly.

a)

high level

b)

low level

c)

middle level

d)

top level

12.

JDBC Stands for

a)

Java Database Connection

b)

Java Database Connectivity

13.

JDBC-ODBC bridge product provide _________ access via ___________.

a)

JDBC driver, JDBC drivers

b)

ODBC drivers, JDBC driver

c)

JDBC driver, ODBC drivers

14.

Methods of ResultSet() throws ____________

a)

IOException

b)

Exception

c)

DatabaseException

d)

SQLException

15.

Name the type number of driver belongs to JDBC ODBC Bridge driver?

a)

Type 1

b)

Type 2

c)

Type 3

d)

Type 4

16.

Native API converts ___________into the __________ used by DBMS.

a)

Native API calls, JDBC API

b)

JDBC API, Native API calls

17.

Native – protocol pure Java converts ……….. in to the ………… used by DBMSs directly.

a)

JDBC calls, network protocol

b)

Native API calls,JDBC API

18.

ODBC Drivers are platform _______________

a)

Dependent

b)

Independent

c)

Both a and b

d)

None

19.

JDBC Driver are platform ________________

a)

Dependent

b)

Independent

c)

Both

d)

None

20.

ODBC requires configuring _______ which represents the target database.

a)

Data String Name

b)

Data Source Name

c)

Domain Name

d)

Database name

21.

The PreparedStatement__________symbol is placeholder that is replaced by the input parameter at seen time.

a)

?

b)

*

c)

&

d)

#

22.

The ResultSet __________________provides methods for retrieving and manipulating the results of executed queries.

a)

Statement

b)

Package

c)

Class

d)

Interface

23.

The Type 3 architecture is _______________________

a)

JDBC-Net pure Java

b)

JDBC-ODBC Bridge Driver

c)

Native API partly Java driver

d)

Native Protocol Pure-Java Driver

24.

The_____________________ is the language for interacting with Database.

a)

Structured Query Language

b)

Data Manipulation Language

c)

Data Definition Language

d)

Stored Query Language

25.

Type 1 driver is also known as

a)

Native API partly Java driver

b)

Native Protocol Pure-Java Driver

c)

JDBC-ODBC Bridge Driver

d)

JDBC-Net pure Java

26.

Type 3 driver is also known as_________________

a)

JDBC-net Pure Java / Network Protocol

b)

JDBC-Net pure Java

c)

Native API partly Java driver

d)

Native Protocol Pure-Java Driver

27.

Type II JDBC driver is also known as __________________.

a)

JDBC-net Pure Java

b)

JDBC-Net pure Java

c)

Native API partly Java driver

d)

Native Protocol Pure-Java Driver

28.

Type IV JDBC driver is also known as __________________

a)

JDBC-net Pure Java

b)

JDBC-Net pure Java

c)

Native API partly Java driver

d)

Native Protocol Pure-Java Driver

29.

Type4 driver is also known as:

a)

100% Pure Java

b)

DBC-net Pure Java

c)

JDBC-Net pure Java

d)

Native API partly Java driver

30.

Where the object of ResultSet maintains a cursor?

a)

Second Row

b)

First Row

c)

Last Row

d)

Middle Row

31.

Which class is used to connect java application to JDBC driver

a)

DriverManager

b)

Connection

c)

Statement

d)

ResultSet

32.

Which driver is called as a thin driver in JDBC?

a)

Type-2 Driver

b)

Type-3 Driver

c)

Type-1 Driver

d)

Type-4 Driver

33.

Which interface provides methods to execute queries with the database?

a)

Statement interface

b)

Connection

c)

Resultset

d)

DriverManager

34.

Which Interface is used to execute dynamic SQL statements?

a)

PreparedStatement

b)

Statement

c)

CallableStatement

d)

Procedurestatement

35.

Which is default ResultSet type?

a)

TYPE_SCROLL_SENSITIVE

b)

TYPE_SCROLL_INSENSITIVE

c)

TYPE_FORWARD_ONLY

d)

TYPE_SCROLL_FIRST

36.

Which JDBC driver Type (s) can be used in either applet or servelt code?

a)

Type 2

b)

Type 3

c)

Type 4

d)

Both Type 3 and Type 4

37.

Which JDBC driver Type(s) can you use in a three-tier architecture and if the Web server and the DBMS are running on the same machine?

a)

Type 3

b)

Type 2

c)

Type 4

d)

Both Type 3 and 4

38.

Which JDBC driver Types are used for over communications networks?

a)

Type 2

b)

Type 3

c)

Type 4

d)

Both Type 3 and Type 4

39.

Which method is used to obtain count of total rows of ResultSet

a)

getRow()

b)

getrow()

c)

GetRow()

d)

Row()

40.

Which method is used to perform DML statements in JDBC?

a)

executeQuery()

b)

execute()

c)

executeUpdate()

d)

executeAll()

41.

Which method of class is used to register & dynamically load the driver class?

a)

forName()

b)

DeviceManager

c)

Statement

d)

Resultset

42.

which of the following function is used to find the column count of the particular ResultSet ?

a)

getColumnCount()

b)

getRow

c)

getcolumnCount()

d)

getcolumncount()

43.

Which of the following invokes functions in sql?

a)

Callable statements

b)

Prepared Statement

c)

Procedure Statement

d)

Statement

44.

Which type of driver converts JDBC calls into the network protocol used by the database management system directely

a)

Type 4

b)

Type 3

c)

Type 2

d)

Type 1

45.

Which type of driver is unqiue in JDBC?

a)

Native Protocol Pure-Java Driver

b)

JDBC-Native API

c)

Native API partly Java driver

d)

JDBC-ODBC Bridge Driver

46.

_______ calls get converted into native C or C++ API calls.

a)

Native Protocol Pure-Java Driver

b)

JDBC-Native API

c)

Native API partly Java driver

d)

JDBC-ODBC Bridge Driver

47.

___________ interface allows storing results of query?

a)

ResultSet

b)

Connection

c)

Statement

d)

DriverManager

48.

All raw data types including binary documents or images should be read and uploaded to the database as an array of ….

a)

Byte

b)

Int

c)

String

d)

Array