![]() |
|
To access information about an Informix database, use the JDBC API DatabaseMetaData interface.
Informix JDBC Driver is completely compatible with the JDBC API specification for accessing database metadata. The driver supports all the methods of the DatabaseMetaData interface.
Informix JDBC Driver uses the sysmaster database to get database metadata. If you want to use the DatabaseMetaData interface in your Java program, the sysmaster database must exist in the Informix database server to which your Java program is connected.
Informix JDBC Driver interprets the JDBC API term schemas to mean the names of Informix users who own tables. The DatabaseMetaData.getSchemas() method returns all the users found in the owner column of the systables system catalog.
Similarly, Informix JDBC Driver interprets the JDBC API term catalogs to mean the names of Informix databases. The method DatabaseMetaData.getCatalogs() returns the names of all the databases that currently exist in the Informix database server to which your Java program is connected.
The example DBMetaData.java shows how to use the DatabaseMetaData and ResultSetMetaData interfaces to gather information about a new procedure. Refer to Appendix A, Sample Code Files, for more information about this example.