-
JVM and JDBC Connectivity
Explain working of Java Virtual Machine (JVM)
Explain the working cycle of the JDBC-ODBC connectivity? -
-
JDBC retrieve Row
How can we retrieve a whole row of data at once in JDBC ?
-
JDBC - Pre compile and Sored Procedure
As prepare statement also precompiles the SQL stmt & stored procedure also compiles the stmt once &den execute the same,then what is the diff between these 2 stmts?
-
JDBC ODBC Class Name
Why we call Class.forName() not Class.Name()?
-
-
-
What is JDBC Driver interface?
The JDBC Driver interface provides vendor-specific implementations of the abstract classes provided by the JDBC API. Each vendors driver must provide implementations of the java.sql.Connection,Statement,PreparedStatement, CallableStatement, ResultSet and Driver.
-
What are the common tasks of JDBC?
Create an instance of a JDBC driver or load JDBC drivers through jdbc.driversRegister a driverSpecify a databaseOpen a database connectionSubmit a queryReceive results
-
What are the flow statements of JDBC?
A URL string -->getConnection-->DriverManager-->Driver-->Connection-->Statement-->executeQuery-->ResultSet.
-
What Class.forName will do while loading drivers?
It is used to create an instance of a driver and register it with the DriverManager. When you have loaded a driver, it is available for making a connection with a DBMS.
-
How to Make Updates to Updatable Result Sets?
Another new feature in the JDBC 2.0 API is the ability to update rows in a result set using methods in the Java programming language rather than having to send an SQL command. But before you can take advantage of this capability, you need to create a ResultSet object that is updatable. In order to do this, you supply the ResultSet constant CONCUR_UPDATABLE to the createStatement method.E.g.Connection...
-
-
Which of the following is true regarding the use of the JDBC-ODBC bridge with the applets.
A) Use of the JDBC-ODBC bridge from an untrusted applet running in a browser, such as Netscape Navigator, isn't allowed.B) It is possible to use the JDBC-ODBC bridge with applets that will be run in appletviewer since appletviewer assumes that applets are trusted.C) It is not possible to use the JDBC-ODBC bridge with applets that are run in the HotJavaTM browser (available from Java Software), since...
-
State true or false :-The JDBC-ODBC bridge from Sun's Java Software does not provide network access to desktop databases like Microsoft access by itself.
A) TrueB) FalseExplanation: Most desktop databases currently require a JDBC solution that uses ODBC underneath. This is because the vendors of these database products haven't implemented all-Java JDBC drivers. The best approach is to use a commercial JDBC driver that supports ODBC and the database you want to use
-
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.
-
State true or falseCan we retrieve a whole row of data at once, instead of calling an individual ResultSet.getXXX method for each column ?
A) TrueB) FalseExplanation: The ResultSet.getXXX methods are the only way to retrieve data from a ResultSet object, which means that you have to make a method call for each column of a row. It is unlikely that this is the cause of a performance problem, however, because it is difficult to see how a column could be fetched without at least the cost of a function call in any scenario.
-
State true or false.Is the JDBC-ODBC bridge multithreaded ?
A) TrueB) FalseExplanation: The JDBC-ODBC Bridge uses synchronized methods to serialize all of the calls that it makes to ODBC. Multi-threaded Java programs may use the Bridge, but they won't get the advantages of multi-threading
-
State true or false .Does the JDBC-ODBC Bridge support multiple concurrent open statements per connection ?
A) TrueB) FalseExplanation: You can open only one Statement object per connection when you are using the JDBC-ODBC Bridge.
-
Which of the following statement is true regarding the three tier model in the JDBC driver model architecture.
A) A middle tier is introduced in this model.B) Collection of SQL statements from the client and handing it over to the database.C) Maintaining control over accessing and updating of receiving results from database to the client.D) All of the above.
JDBC Interview Questions
Ans