Interface database metadata

488 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
488
On SlideShare
0
From Embeds
0
Number of Embeds
15
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Interface database metadata

  1. 1. Interface DatabaseMetaData
  2. 2. • public interface DatabaseMetaDataextends Wrapper
  3. 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. 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.

×