How Do You Discover Database Metadata? JDBC

To discover metadata information about a database, you must create a DatabaseMetaData object. Note that some database vendors might not implement the DatabaseMetaData interface. Once a client program has obtained a valid database connection, the following code can get a database metadata object:

You can use a dbMetaData object to invoke over 100 methods that are defined in the DatabaseMetaData interface. Therefore, to do something useful with DatabaseMetaData, you must get a valid Connection object of type java.sql.Connection. The DatabaseMetaData object provides information about the entire database, such as the names of database tables or the names of a table’s columns. Since various databases support different variants of SQL, thereare also a large number of methods querying the database about what SQL methods it supports. Table offers a partial listing of these methods.

Some DatabaseMetaData Methods

Some DatabaseMetaData Methods



Face Book Twitter Google Plus Instagram Youtube Linkedin Myspace Pinterest Soundcloud Wikipedia

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

JDBC Topics