JDBC Section Index | Page 20
Use the getTableTypes method of interface java.sql.DatabaseMetaData to probe the database for table types. The exact usage is described in the code below. public static void main(S...more
How do I check what table-like database objects (table, view, temporary table, alias) are present in a particular database?
Use java.sql.DatabaseMetaData to probe the database for metadata. Use the getTables method to retrieve information about all database objects (i.e. tables, views, system tables, temporary global o...more
A: The JDBC is used whenever a Java application should communicate with a relational database for which a JDBC driver exists. JDBC is part of the Java platform standard; all visible ...more
Although you may want to avoid it, you can change the transaction isolation level in the midst of executing a transaction. However, this will immediately freeze all the changes made upto that po...more
Quite often in database processing, we come across the situation wherein one transaction can change a value, and a second transaction can read this value before the original change has been comm...more
For SQL statements that are executed repeatedly, using a PreparedStatement object would almost always be faster than using a Statement object. This is because creating a PreparedStatement object...more
Metadata ('data about data') is information about one of two things: Database information (java.sql.DatabaseMetaData), or Information about a specific ResultSet (java.sql.ResultSetMetaData). ...more
Short answer: The PreparedStatement is a slightly more powerful version of a Statement, and should always be at least as quick and eas...more
The database connection is created in 3 steps: Find a proper database URL (see FAQ on JDBC URL) Load the database driver Ask the Java DriverManager class to open a connection to your database...more
There are four types of JDBC database driver: Driver type code Explanation Comment 1 The JDBC/ODBC bridge driver A piece of native C-code that translates a JDBC call to an ODB...more
A database URL (or JDBC URL) is a platform independent way of adressing a database. A database/JDBC URL is of the form jdbc:[subprotocol]:[node]/[databaseName] If you are accessing a databas...more
Use these two Java calls to extract a BLOB (Binary Large OBject) from a database.