Search Header Logo

JDBC Quiz

Authored by Surekha Rajeshwari

Professional Development

Professional Development

Used 1+ times

JDBC Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following is not true about JDBC-ODBC Bridge Driver?

It uses ODBC driver to connect to the database
It converts JDBC method calls into the ODBC function calls
Performance is upgraded because JDBC method call is converted into the ODBC function calls.
It can be easily connected to any database

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Identify the correct way to instantiate DatabaseMetaData object:

DatabaseMetaData ob = new DatabaseMetaData();
DatabaseMetaData ob = connection.getDatabaseMetaData();
DatabaseMetaData ob = connection.getMetaData();
DatabaseMetaData ob = resultset.getDatabaseMetaData();

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following Statement interface is the best option to choose for calling procedures with OUT parameters from DB?

Statement
PreparedStatement
CallableStatement
All the above

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following is advantage of using PreparedStatement in Java?

It allows different arguments to run on the same execution plan
It increases the performance
it is more secure with binding variables and avoids sql injection
All the above

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which method is used to stop the action of committing every sql statement as it is executed from statement object?

con.setAutoCommit(true)
con.setAutoCommit(false)
con.commit()
con.commit(true)

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following methods are used for batch processing?

addBatch() and execute()
addBatch() and executeBatch()
setBatch() and execute()
setBatch() and executeBatch()

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which all of the below actions are done by the Statement object of JDBC?

A Statement object encapsulates an SQL statement which is passed to the database to be

1. parsed

2. compiled

3. planned

4. executed

1,2,3,4
1,2,3
2,3,4
1,2,4

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?