3. •
•
•
•
•
•
•
•
•
The java.sql.DatabaseMetaData is an interface implemented by the JDBC driver
provider.
The DatabaseMetaData object encapsulates all the information related to the database
and driver.
We know that different DBMS often support different features and data types and
implement those features in different ways.
The DatabaseMetaData object is useful for the following operations while creating a
generic application, such as Hibernate, with maximum portability and frameworks:
1. to use the functionalities of DBMS in combination with JDBC Driver. For example, the
DatabaseMetaData.supportsCorrelatedSubquries() method is used to find whether it is
possible to use a correlated subquery or not.
2. to get the database details, such as DB vendor name, product name, and version.
3. to find the support for optional JDBC features from a JDBC driver. For example, the
DatabaseMetaData.supportsBatchUpdates() method is used to find whether it is
possible to use batch updates or not.
4. to find the approach used with JDBC driver to implement the advanced JDBC options.
We use the Connection.getMetaData() method to get the DatabaseMetaData object.
4. ownDeleteAreVisible()
• Used to find whether the deletion is visible as replaced with an empty row
in the ResultSet object of the given type.
• It returns false if the ResultSet object still contains the deleted row, if the
deletion is not visible as a change to the ResultSet object of the given
type.