Time remaining
:
:
Test Status
JDBCRANDOMTEST
Ques 1 :
JDBC-ODBC Bridge is platform independent driver.
(A) False
(B) True
Ques 2 :
To execute a stored procedure â??totalStockâ?? in a database server, which of the following code snippet is used?
(A) CallableStatement clbstmnt = con.prepareCall("{call totalStock}");cs.executeQuery();
(B) Statement stmt = connection.createStatement();stmt.execute("totalStock()");
(C) StoreProcedureStatement spstmt = connection.createStoreProcedure("totalStock()");spstmt.executeQuery();
(D) PrepareStatement pstmt = connection.prepareStatement("totalStock()");pstmt.execute();
Ques 3 :
Is the JDBC-ODBC Bridge multi-threaded?
(A) NO
(B) Yes
Ques 4 :
Which of the following is false regarding the Type 3 JDBC driver
(A) A Type 3 driver is a JDBC-Net pure Java driver
(B) This translates JDBC calls into a database -dependent net protocol.
(C) Vendors of database middleware products can implement this type of driver into their products to provide interoperability with the greatest number of database servers.
(D) a,b
Ques 5 :
what is jdbc ?
(A) a
(B) b
(C) c
(D) d
Ques 6 :
Whatâ??s the difference between TYPE_SCROLL_INSENSITIVE , and TYPE_SCROLL_SENSITIVE?
(A) Both types of result sets will make changes visible if they are closed and then reopened.
(B) A result set that is TYPE_SCROLL_INSENSITIVE does not reflect changes made while it is still open and one that is TYPE_SCROLL_SENSITIVE does.
(C) You will get a scrollable ResultSet object if you specify one of these ResultSet constants.
(D) A result set that is TYPE_SCROLL_INSENSITIVE makes the result set read only while one that is TYPE_SCROLL_SENSITIVE does not.
Ques 7 :
Which method is used to find the number of column in ResultSet?
(A) getNumberOfColumn
(B) getMaxColumn
(C) getColumnCount
(D) getColumns
Ques 8 :
State true or false Can we retrieve a whole row of data at once, instead of calling an individual ResultSet.getXXX method for each column ?
(A) True
(B) False
Ques 9 :
Which of the following describes the correct sequence of the steps involved in making a connection with a database.
1. Loading the driver
2. Process the results.
3. Making the connection with the database.
4. Executing the SQL statements.
(A) 1,2,3,4
(B) 1,3,4,2
(C) 2,1,3,4
(D) 4,1,2,3
Ques 10 :
ResultSet.CONCUR_UPDATABLE used with the result set is used
to update the rows directly in the database.
(A) False
(B) True
Ques 11 :
If your Java application is accessing multiple types of databases at the same time, which type of driver is the preferred driver.
(A) Type-1
(B) Type-2
(C) Type-3
(D) Type-4
Ques 12 :
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 1 only
(B) Type 2 only
(C) Both Type 3 and Type 4
(D) All of Type 1, Type 2, Type 3 and Type 4
Ques 13 :
Which of the following statements is true regarding the failing of the class.forName in jdk 1.1.x.
(A) A workaround is to explicitly call the method DriverManager.registerDriver(new YourDriverClass).
(B) The problem is due to race condition in the class loader.
(C) The race condition prevents the static section of code in the driver class from executing and registering the driver with the DriverManager.
(D) All the above.
Ques 14 :
Which JDBC driver Type(s) is(are) the JDBC-ODBC bridge?
(A) Type 1
(B) Type 2
(C) Type 3
(D) Type 4
Ques 15 :
Which driver is efficient and always preferable for using JDBC applications?
(A) Type-4
(B) Type-1
(C) Type-2
(D) Type-3
Ques 16 :
Where is metadata stored in MySQL?
(A) In the MySQL database mysql
(B) In the MySQL database metadata
(C) In the MySQL database metasql
(D) In the MySQL database mysql
Ques 17 :
Which of the following statements is false as far as different type of statements is concern in JDBC?
(A) Regular Statement
(B) Interim Statement
(C) Callable Statement
(D) Prepared Statement
Ques 18 :
Which of the following methods are needed for loading a database driver in JDBC?
(A) registerDriver() method
(B) Class.forName()
(C) Both A and B
(D) getConnection()
Ques 19 :
How many different types of resultset in JDBC?
(A) 1
(B) 2
(C) 3
(D) 4
Ques 20 :
Which type of JDBC driver is the fastest one?
(A) Type 4
(B) Type 3
(C) Type 2
(D) Type 1
Submit Answer
Don't Refresh the Page !! ...