Database connectivity with JDBC Set-2

Errorlogger
0


1) Which interface provides methods to execute queries with the database?
A) Connection interface
B) Statement interface
C) ResultSet interface
D) None of the above


2) Which maintains a cursor pointing to a particular row of data,Initially, cursor points to before the first row?
A) Connection interface
B) Statement interface
C) ResultSet interface
D) None of the above


3) ResultSet object can be moved forward only and it is updatable?
A) True
B) False


4) Which is used to execute parameterized query?
A) Statement interface
B) PreparedStatement interface
C) ResultSet interface
D) None of the above


5) The performance of the application will be faster if you use PreparedStatement interface because query is compiled only once?
A) True
B) False


6) This is an example of prepared statement interface that ?
PreparedStatement stmt=con.prepareStatement("select * from emp");
ResultSet rs=stmt.executeQuery();
while(rs.next()){
System.out.println(rs.getInt(1)+" "+rs.getString(2));
}

A) deletes the record
B) retrieve the record
C) updates the record
D) inserts the record


7) ResultSetMetaData interface is useful because it provides methods to get metadata from the ResultSet object?
A) True
B) False


8) By using Which interface You can store images in the database in java by the help of ?
A) PreparedStatement interface
B) ResultSetMetaData interface
C) DatabaseMetData interface
D) None of the above


9) Abbreviate the full form of CLOB?
A) Character Large Object
B) Character Loop Object
C) Collection Large Object
D) Collection Loop Object


10) Which is used to call the stored procedures and functions, CallableStatement interface?
A) CallableStatement Interface
B) PreparedStatement Interface
C) Both A & B
D) None of the above


11) The performance of the application will be faster if you use PreparedStatement interface because query is compiled only once?
A) True
B) False


12) The ACID properties does not describes the transaction management well ?
A) True
B) False


13) JDBC stands for?
A) Java database connectivity
B) Java database concept
C) Java database communications
D) None of the above


14) ARRAY,CLOB,BLOB and REF type columns can be updated in?
A) JDBC 2.0
B) JDBC 1.0
C) JDBC 3.0
D) JDBC 4.0


15) In Transaction Management of JDBC which means once a transaction has been committed, it will remain so, even in the event of errors, power loss etc.?
A) Atomicity
B) Isolation
C) Consistency
D) Durability


16) In Transaction Management in JDBC Transaction represents?
A) single unit of work
B) Multiple unit of work
C) Both A & B
D) None of the above


17) which interfaces provide methods for batch processing in JDBC?
A) java.sql.Statement
B) java.sql.PreparedStatement
C) Both A & B
D) None of the above


18) JDBC RowSet is the wrapper of ResultSet,It holds tabular data like ResultSet but it is easy and flexible to use?
A) True
B) False
Tags

Post a Comment

0Comments

Post a Comment (0)

#buttons=(Accept !) #days=(30)

Our website uses cookies to enhance your experience. Check Now
Accept !