1. JDBC is an API for the _________ programming language.
2. _____ will create a RowSet object.
3. _______ is not a method of a ResultSet cursor.
4. ______ is NOT a subclass of SQLException
5. While accessing databses such as Oracle, Sybase or IBM, the preferred driver type is:
6. _______ is not a valid ResultSet type.
7. A ________ is a subclass of SQLException.
8. public void updateString(int columnIndex, String s) throws SQLException
9. The _______ method adds SQL commands to the list associated with a Statement object.
10. In order to access Database stored procedures, the best JDBC interface is:
11. Which is not an overloaded DriverManager.getConnection () method?
12. A ______ is not contained in an SQLException.
13. To jump back to a specific point in the program, create a:
14. boolean execute (String SQL) returns:
15. A ________ is used to mark intermediate points inside a transaction in order to get a more fine-grained control.
16. The executeUpdate method from Statement returns:
17. All JDBC Rowset objects are derived from which interface?
18. ________ is an object used for precompiling SQL statements that may contain input parameters.
19. ______ is NOT a valid parameter mode for a stored procedure.
20. The RowSet object holds data in a tabular form that is more flexible and easier to use than the ResultSet object.
21. JDBC API uses which drivers to connect to the database?
22. To close existing database connections, you should call
23. JDBC is an API to access relational databases, spreadsheets, and flat files.
24. A transaction is closed when close() is called on the Connection object.
25. The default mode when a connection is created is auto-commit mode.
26. In order to accept input parameters at runtime, use the following JDBC interface:
27. {fn length('Friday')} will return
28. Which in not required by the getConnection() method to create a connecton object?
29. In the command jdbc:derby:testdb;create=true, testdb stands for
30. At the end of the JDBC program, it is explicity required to close al the connections to the database?
31. When a Driver Class is loaded, it creates an instance of itself and registers it with:
32. If executing a Statement object many times, a PreparedStement object will reduce execution time.
33. SQLWarning objects are a subclass of SQLException.
34. _______ extends the RowSet interface.
35. If the column you are interested in viewing contains an int, which of the following methods of Resultset can be used?
36. The Class.forname() method is used to:
37. If the ResultSet type is TYPE_FORWARD_ONLY, it implies:
38. A ______ object lets you access the data returned by an SQL statement.
39. Which is NOT needed to set up a JDBC Environment:
40. The SQLXML interface provides the _____ method to access its internal content.
41. In order to commit changes to the database, use:
42. If a database operation fails, JDBC raises an:
43. JDBC stands for _______.
44. What kind of database is the command jdbc:mysql:://localhost:3306/ is connecting to?
45. JDBC will work with many different database management systems.
46. You must register your JDBC driver in your program before using it?
47. Which package contains the JDBC classes?
48. In the syntax {ts 'yyyy-mm-dd hh:mm:ss'}, ts stands for
49. The most common exception you'll deal with JDBC:
50. In order to undo the previous transaction, use
51. Autocommit must be set to false when using batch processing with Statement object?
52. ________ is NOT a step you must perform to process an SQL statement.
53. A _______ is used to access the data in a ResultSet.
54. JDBC is an API to connect object and XML data sources.
55. _______ driver type(s) are for use over communication networks.
56. _______ JDBC driver type(s) can be used in either applet or servlet code.
57. _______ driver type(s) can be used in a three-tier architecture and if the web server and DBMS are running on the same machine.
58. _______ driver type is the JDBC-ODBC bridge?
59. Transaction_read_committed (one example of transaction isolation level) does not alow:
60. If you are going to use Static SQL statements at runtime, the best JDBC interface to use is:
61. Which parameter is used by the Preparedstatement object?
62. A _______ is a set of one or more statements that is executed as a unit.
63. Which object has the ability to use input and output streams to supply parameter data?
64. The DATALINK SQL data type maps to the JDBC _____ object.
65. _______ is NOT a valid example of a transaction isolation level.
66. Which driver type is best suited for development and testing purpose?
67. MySQL and Java DB support the ARRAY SQL data type.
68. Which is not an Advanced Data type in JDBC API?
69. The _______ of a ResultSet object determines what level of update functionality is supported.
70. After fetching an instance of the Connection object, a live connection must first be established before making queries to the database.
71. Applications may release Blob, Clob, and NClob resources by invoking their release method.
72. For storing file into the database, which datatype is used in table?
73. The list associated with a Statement object may contain a statement that produces a ResultSet object.
74. General SQL escape syntax format is:
75. If your Java aplication is accessing multiple databases at the same time, the preferred driver type is:
76. Resources used by Blob, Clob an NClob Java objects can be released by using which method?
77. A transaction is finished when commit() or rollback() is called on the Transaction object.
78. A ______ RowSet object makes a connection to a data source only to read or write data based on a ResultSet object.
79. Open Database Connectivity is:
80. Which method eliminates the need to call wasNull() method to handle null database fields?
81. ResultSet objects follow index patterns of:
82. Servlet developers should avoid using JDBC-ODBC bridge driver because:
83. Transactions have a property called atomicity, which means:
84. A warning can be thrown by a Connection object, a Statement object or a ResultSet object. Which method is used to retrieve the warning:
85. Open Database Connectivity is:
86. SQLWarning object deals with database access warnings. It is a subclass of:
87. JDBC is based on:
88. Under which category does the following driver fall: WebLogic's Tengah 'all Java Type-3 driver'
89. You have obtained a ResultSet object named 'rs' after executing the following query: SELECT * FROM CUSTOMER Which loop can you use to return all the records in the ResultSet?
90. SQLException has a method, which provides the feature of chaining or encapsulation of additional Exception objects. Identify the method from the following:
91. You have obtained a scrollable ResultSet named 'srs' by executing a query. Which of the following methods will you use to verify the position of the cursor?
92. Java Database Connectivity (JDBC) is a:
93. Please select all the correct options. JDBC Driver Manager is:
94. Which exception will be thrown in your code, if the specified driver could not be loaded?
95. Which JDBC driver is considered best in terms of performance and efficiency?
96. A process allows you to group multiple SQL statements. Commit or Rollback can be performed on the group together. This process is known as:
97. How will you create a new instance of a JDBC driver explicitly?
98. You want to execute a CallableStatement named 'cs'. It is expected to return multiples results. Which of the following methods will you choose?
99. Which is not true for a ResultSet?
100. Your project leader has asked you to improve the performance of JDBC connectivity by reusing objects in your Servlet's code. Which is an appropriate solution?
101. You executed a query to retrieve 40 products from the database and obtained a scrollable ResultSet named 'scrollrs'. You started scrolling the ResultSet as follows: scrollrs.next(); scrollrs.absolute(-10); scrollrs.relative(-6); At which row number is the cursor currently located?
102. ResultSet objects follow index patterns of:
103. What should the syntax be to establish a connection with a Database?
104. Which method will you use to execute INSERT, UPDATE and DELETE SQL statements?
105. You want to start a transaction for bank account processing. Which method will you execute on the Connection object to begin it?
106. You are developing a shopping cart for your client. Where would you like to put your business logic?
107. Name the interface you will use to retrieve the underlying structure of the query result:
108. You are trying to connect to a database through JDBC. There is a problem with one of the methods immediately after the driver has been loaded. Which exception will be thrown?
109. How do you register a JDBC driver?
110. Will the below script execute properly? 1.CREATE TABLE CUSTOMER 2.( 3.CUS_NAME VARCHAR(32), SUP_ID INTEGER, PRICE FLOAT, SALES INTEGER 4.)
111. Your project leader has given you a new task. You have to work on a module in which the transaction has to be extended across multiple page requests and multiple servlets. How will you implement this?
112. Which is the syntax for creating a CallableStatement?
113. Which is not true?
114. After executing the following code, resultvar contains false. What should the next step be? boolean resultvar=stmt.execute(sql);
115. You want to execute the following query string, using the connection named 'con': String query = 'SELECT * FROM CUSTOMER'; What should the syntax be?
116. You need to use a third party driver for establishing a connection with the database. The subprotocol is 'webx' and the DSN is 'webdsn'. What is the syntax of the URL?
117. When you are handling user-submitted SQL, you may retrieve a ResultSet or a count. Which method is handy in this situation?
118. A user leaves an online shopping cart without checking out. Which interfaces will notify to Rollback the transaction?
119. Which JDBC methods is used for retrieving large binary objects?
120. The code segment below defines a query: String qry='SELECT CUS_NAME, PRICE FROM CUSTOMER'; Which of the following code snippets will create a scrollable ResultSet?
121. You have to handle an erroneous situation in a transaction. Which method comes handy in this case?
122. Which type of statement object will you use to execute a stored procedure?
123. Which method eliminates the need to call wasNull() method to handle null database fields?
124. Consider the following statement: PreparedStatement ps=con.prepareStatement('INSERT INTO ORDER (CUSTOMER_ID ,PRICE) VALUES(?,?)'); Which should come after this statement?