JDBC
JDBC
Question 1:
Answer: B,C
Question 2:
Answer: C
Question 3:
Answer: A
Question 4:
Answer: D
Question 5:
Answer :A
Question 6:
Answer :D
Question 7:
Answer :B
Question 8:
Answer :C
Question 9:
Answer :D
Question 10:
Answer :C
Question 11:
Answer :B
Question 12:
Answer :B,D
Question 13:
Answer :D
Question 14:
What is the meaning of the transaction isolation level
TRANSACTION_REPEATABLE_READ
(a) Dirty reads, non-repeatable reads and phantom reads can
occur
(b) Dirty reads are prevented; non-repeatable reads and
phantom reads can occur
(c) Dirty reads and non-repeatable reads are prevented;
phantom reads can occur
(d) Dirty reads, non-repeatable reads and phantom reads are
prevented
Answer :C
Question 15:
Question 16:
Answer :A
Question 17:
Answer :B
Question 18:
Question 19:
Answer :C,D
Question 20:
What is correct about DDL statements (create, grant,...)?
(a) DDL statements are treated as normal SQL statements, and
are executed by calling the
execute() method on a Statement (or a sub interface thereof)
object
(b) To execute DDL statements, you have to install additional
support files
(c) DDL statements can not be executed by making use of JDBC,
you should use the native
database tools for this.
(d) Support for DDL statements will be a feature of a future
release of JDBC
Answer :A
Question 21:
The JDBC-ODBC Bridge supports multiple concurrent open statements per connection?
A) True
B) False
Answer : B
Question 22:
Which of the following methods are needed for loading a database driver in JDBC?
a) registerDriver()
b) Class.forName()
c) Both a and b
d) getConnection()
Answer : B
Question 23:
To execute a stored procedure in the database server which statement object is used?
a) Statement
b) Prepared Statement
c) Callable Statement
d) All of the above
Answer : C
Question 24:
Answer : D
Question 25:
A) ExecuteQuery()
B) executeUpdate()
C) getConnection()
D) prepareCall()
Answer : C
Question 26:
All raw data types (including binary documents or images) should be read and uploaded to the
database as array of
a) byte
b) int
c) Boolean
d) Char
Answer : A
Question 27:
A) Type –i
B) Type- 2
C) Type -3
D) Type -4
Answer : D
Question 28:
A) 4
B) 3
C) 5
D) 2
Answer : A
Question 29:
a) executeQuery()
b) execute()
c) executeUpdate()
d) executeResult()
Answer : c
Question 30:
A) true
B) False
Answer : A