JDBC Reference,
Page 7 of 30


[top]
[prev]
[next]
Documentation Top
Global Index
Reference Manual
TOC Index
Grammar index
Developer's Guide
TOC Index
Tuning Cloudscape
TOC Index

java.sql.DatabaseMetaData

Stored Prepared Statements for DatabaseMetaData Queries

The JDBC driver has built-in queries that it uses to supply the results of the JDBC DatabaseMetaData methods that supply information about the Cloudscape system. These methods are useful for applications working with generic DBMSs, such as database tools, not Cloudscape-specific applications, which can query system catalogs directly.

The cloudscape.jdbc.metadataStoredPreparedStatements property configures Cloudscape’s built-in JDBC driver to take advantage of stored prepared statements to avoid preparing these queries each time an application starts up.

JDBC DatabaseMetaData queries are duplicated in every Cloudscape database even if a single Cloudscape system manages several databases.

With this property, you have the option of having Cloudscape create and store the statements as needed (dynamically) or all at once when the database is created.

For more information, see cloudscape.jdbc.metadataStoredPreparedStatements in Tuning Cloudscape.

NEW: The getColumns method returns a ResultSet that contains a column called COLUMN_DEF. This method returns the default value of the columns, which are newly supported in Version 3.0.

DatabaseMetaData Result Sets

DatabaseMetaData result sets do not close the result sets of other statements, even when auto-commit is set to true.

DatabaseMetaData result sets are closed if a user performs any other action on a JDBC object that causes an automatic commit to occur. If you need the DatabaseMetaData result sets to be accessible while executing other actions that would cause automatic commits, turn off auto-commit with setAutoCommit(false).

DatabaseMetaData Functionality Not Supported

In the current release, Cloudscape does not provide all of the DatabaseMetaData functionality. The following JDBC requests result in empty result sets, in the format required by the JDBC API:

  • getColumnPrivileges
  • getProcedureColumns
  • getTablePrivileges

Cloudscape does not implement privileges, and thus has no information to provide for these calls.

getBestRowIdentifier looks for identifiers in this order:

  • a primary key on the table
  • a unique constraint or unique index on the table
  • all the columns in the table

Because of this last choice, it will always find a set of columns that identify a row. However, if there are duplicate rows in the table, use of all columns may not necessarily identify a unique row in the table.

[top]
[prev]
[next]


Cloudscape Version 3.0
For technical support, go to: www.cloudscape.com and click Support.
Copyright © 1998 and 1999 Cloudscape, Inc. All rights reserved.