JDBC FAQ Questions
1) What is a database URL?
2) How do I create a database connection?
3) What is the difference between a Statement and a PreparedStatement?
4) What is Metadata and why should I use it?
5) What is the advantage of using a PreparedStatement?
6) Can I make a change to the transaction isolation level in the midst of executing the transaction?
7) At a glance, how does the Java Database Connectivity (JDBC) work?
8) How do I check what table-like database objects (table, view, temporary table, alias) are present in a particular database?
9) How do I find all database stored procedures in a database?
10) What properties should I supply to a database driver in order to connect to a database?
11)I have the choice of manipulating database data using a byte[] or a java.sql.Blob. Which has best performance?
12) I have the choice of manipulating database data using a String or a java.sql.Clob. Which has best performance?
13) Do I need to commit after an INSERT call in JDBC or does JDBC do it automatically in the DB?
14) How can I retrieve only the first n rows, second n rows of a database using a particular WHERE clause ? For example, if a SELECT typically returns a 1000 rows, how do first retrieve the 100 rows, then go back and retrieve the next 100 rows and so on ?
15) What does ResultSet actually contain? Is it the actual data of the result or some links to databases? If it is the actual data then why can't we access it after connection is closed?
16) What are SQL3 data types?
17) How can I manage special characters (for example: " _ ' % ) when I execute an INSERT query? If I don't filter the quoting marks or the apostrophe, for example, the SQL string will cause an error.
18) What is SQLJ and why would I want to use it instead of JDBC?
19) How do I insert an image file (or other raw data) into a database?
20) How can I pool my database connections so I don't have to keep reconnecting to the database?
21) Will a call to PreparedStatement.executeQuery() always close the ResultSet from the previous executeQuery()?
22) How do I upload SQL3 BLOB & CLOB data to a database?
23) What is the difference between client and server database cursors?
24) Are prepared statements faster because they are compiled? if so, where and when are they compiled?
25) Is it possible to connect to multiple databases simultaneously? Can one extract/update data from multiple databases with a single statement?
26) Why do I get an UnsupportedOperationException?
27) What advantage is there to using prepared statements if I am using connection pooling or closing the connection frequently to avoid resource/connection/cursor limitations?
28) What is JDBC, anyhow?
29) Can I reuse a Statement or must I create a new one for each query?
30) What is a three-tier architecture?
31) What separates one tier from another in the context of n-tiered architecture?
32) What areas should I focus on for the best performance in a JDBC application?
33) How can I insert multiple rows into a database in a single transaction?
34) How do I convert a java.sql.Timestamp to a java.util.Date?
35) What is SQL?
36) Is Class.forName(Drivername) the only way to load a driver? Can I instantiate the Driver and use the object of the driver?
37) What's new in JDBC 3.0?
38) Why do I get the message "No Suitable Driver"?
39) When I create multiple Statements on my Connection, only the current Statement appears to be executed. What's the problem?
40) Can a single thread open up mutliple connections simultaneously for the same database and for same table?
41) Can I ensure that my app has the latest data?
42) What does normalization mean for java.sql.Date and java.sql.Time?
43) What's the best way, in terms of performance, to do multiple insert/update statements, a PreparedStatement or Batch Updates?
44) What is JDO?
45) What is the difference between setMaxRows(int) and SetFetchSize(int)? Can either reduce processing time?
46) What is DML?
47) What is DDL?
48) How can I get information about foreign keys used in a table?
49) How do I disallow NULL values in a table?
50) What isolation level is used by the DBMS when inserting, updating and selecting rows from a database?
No comments:
Post a Comment