Aptitude Reasoning English GK Computer Knowledge Programming Skill Banking Software Testing



Question - 1

What are the major components of the JDBC?

  • DriverManager, Driver, Connection, Statement, and ResultSet
  • DriverManager, Statement, and ResultSet
  • DriverManager, Driver, Connection, and Statement
  • DriverManager, Connection, Statement, and ResultSet
Solutions
Question - 2

Select the packages in which JDBC classes are defined?

  • jdbc and javax.jdbc
  • rdb and javax.rdb
  • jdbc and java.jdbc.sql
  • sql and javax.sql
Solutions
Question - 3

The thin driver is also known as?

  • Type 3 Driver
  • Type-2 Driver
  • Type-4 Driver
  • Type-1 Driver
Solutions
Question - 4

Which of the following method is used to perform DML statements in JDBC?

  • executeResult()
  • executeQuery()
  • executeUpdate()
  • execute()
Solutions
Question - 5

How many transaction isolation levels provide the JDBC through the Connection interface?

  • 3
  • 4
  • 7
  • 2
Solutions
Question - 6

Which of the following method is static and synchronized in JDBC API?

  • getConnection()
  • prepareCall()
  • executeUpdate()
  • executeQuery()
Solutions
Question - 7

Which of the following is not a valid statement in JDBC?

  • Statement
  • PreparedStatement
  • QueryStatement
  • CallableStatement
Solutions
Question - 8

Which of the following type of JDBC drivers, uses database native protocol?

  • JDBC-ODBC Bridge plus ODBC driver
  • Native-API, partly Java driver
  • JDBC-Net, pure Java driver
  • Native-protocol, pure Java driver
Solutions
Question - 9

How does JDBC handle the data types of Java and database?

  • The JDBC driver converts the Java data type to the appropriate JDBC type before sending it to the database.
  • It uses a default mapping for most data types.
  • Both A and B
  • None of these
Solutions
Question - 10

What is, in terms of JDBC, a DataSource?

  • A DataSource is the basic service for managing a set of JDBC drivers
  • A DataSource is the Java representation of a physical data source
  • A DataSource is a registry point for JNDI-services
  • A DataSource is a factory of connections to a physical data source
Solutions
Question - 11

How can you execute a stored procedure in the database?

  • Call method execute() on a CallableStatement object
  • Call method executeProcedure() on a Statement object
  • Call method execute() on a StoredProcedure object
  • Call method run() on a ProcedureCommand object
Solutions
Question - 12

Which of the following statements is false as far as different types of statements are concerned in JDBC?

  • Regular Statement
  • Prepared Statement
  • Callable Statement
  • Interim Statement
Solutions
Question - 13

The JDBC-ODBC bridge is:

  • Three tiered
  • Multithreaded
  • Best for any platform
  • All of the above
Solutions
Question - 14

BLOB, CLOB, ARRAY, and REF type columns can be updated in:

  • JDBC 1.0
  • JDBC 4.0
  • JDBC 2.0
  • JDBC 3.0
Solutions
Question - 15

When does the message "No Suitable Driver" occur?

  • When the driver is not registered by Class.forname() method
  • When the user name, password and the database does not match
  • When the JDBC database URL passed is not constructed properly
  • When the type 4 driver is used
Solutions
Question - 16

What is the disadvantage of Type-4 Native-Protocol Driver?

  • At client side, a separate driver is needed for each database.
  • Type-4 driver is entirely written in Java
  • The driver converts JDBC calls into vendor-specific database protocol
  • It does not support to read MySQL data
Solutions
Question - 17

Identify the isolation level that prevents the dirty in the JDBC Connection class?

  • TRANSACTION_READABLE_READ
  • TRANSACTION_READ_COMMITTED
  • TRANSACTION_READ_UNCOMMITTED
  • TRANSACTION_NONE
Solutions
Question - 18

What does setAutoCommit(false) do?

  • It will not commit transactions automatically after each query.
  • It explicitly commits the transaction.
  • It never commits the transactions.
  • It does not commit transaction automatically after each query.
Solutions
Question - 19

A good way to debug JDBC-related problems is to enable:

  • JDBC tracing
  • Exception handling
  • Both A and B
  • Only B
Solutions
Question - 20

Which of the following is not a type of ResultSet object?

  • TYPE_FORWARD_ONLY
  • CONCUR_WRITE_ONLY
  • TYPE_SCROLL_INSENSITIVE
  • TYPE_SCROLL_SENSITIVE
Solutions
Tags:
60+ Best JDBC Interview Questions, JDBC MCQ questions for placement,JDBC interview questions, Previously asked JDBC Questions, Frequently asked JDBC Questions,JDBC Questions for TCS, JDBC Interview Questions for Freshers, JDBC Interview Questions for Experience, Accenture JDBC Interview Questions, JDBC Objective Questions for Interview


Practice More sets Questions