java.sql Interface DatabaseMetaData

java.sql 
Interface DatabaseMetaData

AllSuperinterfaces:
Wrapper

public interface DatabaseMetaData
extendsWrapper

Comprehensiveinformation about the database as a whole.

Thisinterface is implemented by driver vendors to let users know thecapabilities of a Database Management System (DBMS) in combinationwith the driver based on JDBCTM technology ("JDBC driver")that is used with it. Different relational DBMSs often supportdifferent features, implement features in different ways, and usedifferent data types. In addition, a driver may implement a featureon top of what the DBMS offers. Information returned by methods inthis interface applies to the capabilities of a particular driverand a particular DBMS working together. Note that as used in thisdocumentation, the term "database" is used generically to refer toboth the driver and DBMS.

Auser for this interface is commonly a tool that needs to discoverhow to deal with the underlying DBMS. This is especially true forapplications that are intended to be used with more than one DBMS.For example, a tool might use themethod getTypeInfo tofind out what data types can be used ina CREATETABLE statement. Or a user might call themethod supportsCorrelatedSubqueries tosee if it is possible to use a correlated subqueryor supportsBatchUpdates tosee if it is possible to use batch updates.

Some DatabaseMetaData methodsreturn lists of information in the formof ResultSet objects.Regular ResultSet methods,suchas getString and getInt,can be used to retrieve the data fromthese ResultSetobjects. If a givenform of metadata is not available, anempty ResultSet willbe returned. Additional columns beyond the columns defined to bereturned bythe ResultSet objectfor a given method can be defined by the JDBC driver vendor andmust be accessed by their columnlabel.

Some DatabaseMetaData methodstake arguments that are String patterns. These arguments all havenames such as fooPattern. Within a pattern String, "%" means matchany substring of 0 or more characters, and "_" means match any onecharacter. Only metadata entries matching the search pattern arereturned. If a search pattern argument is setto null, that argument's criterionwill be dropped from the search.


FieldSummary
static shortattributeNoNulls 
          Indicatesthat NULL valuesmight not be allowed.
static shortattributeNullable 
          Indicatesthat NULL values aredefinitely allowed.
static shortattributeNullableUnknown 
          Indicatesthatwhether NULL valuesare allowed is not known.
static intbestRowNotPseudo 
          Indicatesthat the best row identifier is NOT a pseudo column.
static intbestRowPseudo 
          Indicatesthat the best row identifier is a pseudo column.
static intbestRowSession 
          Indicatesthat the scope of the best row identifier is the remainder of thecurrent session.
static intbestRowTemporary 
          Indicatesthat the scope of the best row identifier is very temporary,lasting only while the row is being used.
static intbestRowTransaction 
          Indicatesthat the scope of the best row identifier is the remainder of thecurrent transaction.
static intbestRowUnknown 
          Indicatesthat the best row identifier may or may not be a pseudocolumn.
static intcolumnNoNulls 
          Indicatesthat the column might notallow NULL values.
static intcolumnNullable 
          Indicatesthat the column definitelyallows NULL values.
static intcolumnNullableUnknown 
          Indicatesthat the nullability of columns is unknown.
static intfunctionColumnIn 
          Indicatesthat the parameter or column is an IN parameter.
static intfunctionColumnInOut 
          Indicatesthat the parameter or column is an INOUT parameter.
static intfunctionColumnOut 
          Indicatesthat the parameter or column is an OUT parameter.
static intfunctionColumnResult 
          Indicatesthat the parameter or column is a column in a result set.
static intfunctionColumnUnknown 
          Indicatesthat type of the parameter or column is unknown.
static intfunctionNoNulls 
          Indicatesthat NULL values arenot allowed.
static intfunctionNoTable 
          Indicatesthat the function does not return a table.
static intfunctionNullable 
          Indicatesthat NULL values areallowed.
static intfunctionNullableUnknown 
          Indicatesthatwhether NULL valuesare allowed is unknown.
static intfunctionResultUnknown 
          Indicatesthat it is not known whether the function returns a result or atable.
static intfunctionReturn 
          Indicatesthat the parameter or column is a return value.
static intfunctionReturnsTable 
          Indicatesthat the function returns a table.
static intimportedKeyCascade 
          Forthe column UPDATE_RULE, indicatesthat when the primary key is updated, the foreign key (importedkey) is changed to agree with it.
static intimportedKeyInitiallyDeferred 
          Indicatesdeferrability.
static intimportedKeyInitiallyImmediate 
          Indicatesdeferrability.
static intimportedKeyNoAction 
          Forthecolumns UPDATE_RULE and DELETE_RULE,indicates that if the primary key has been imported, it cannot beupdated or deleted.
static intimportedKeyNotDeferrable 
          Indicatesdeferrability.
static intimportedKeyRestrict 
          Forthe column UPDATE_RULE, indicatesthat a primary key may not be updated if it has been imported byanother table as a foreign key.
static intimportedKeySetDefault 
          Forthecolumns UPDATE_RULE and DELETE_RULE,indicates that if the primary key is updated or deleted, theforeign key (imported key) is set to the default value.
static intimportedKeySetNull 
          Forthecolumns UPDATE_RULE and DELETE_RULE,indicates that when the primary key is updated or deleted, theforeign key (imported key) is changedto NULL.
static intprocedureColumnIn 
          Indicatesthat the column stores IN parameters.
static intprocedureColumnInOut 
          Indicatesthat the column stores INOUT parameters.
static intprocedureColumnOut 
          Indicatesthat the column stores OUT parameters.
static intprocedureColumnResult 
          Indicatesthat the column stores results.
static intprocedureColumnReturn 
          Indicatesthat the column stores return values.
static intprocedureColumnUnknown 
          Indicatesthat type of the column is unknown.
static intprocedureNoNulls 
          Indicatesthat NULL values arenot allowed.
static intprocedureNoResult 
          Indicatesthat the procedure does not return a result.
static intprocedureNullable 
          Indicatesthat NULL values areallowed.
static intprocedureNullableUnknown 
          Indicatesthatwhether NULL valuesare allowed is unknown.
static intprocedureResultUnknown 
          Indicatesthat it is not known whether the procedure returns a result.
static intprocedureReturnsResult 
          Indicatesthat the procedure returns a result.
static intsqlStateSQL 
          Apossible return value for themethod DatabaseMetaData.getSQLStateType whichis used to indicate whether the value returned by themethod SQLException.getSQLState isan SQLSTATE value.
static intsqlStateSQL99 
          Apossible return value for themethod DatabaseMetaData.getSQLStateType whichis used to indicate whether the value returned by themethod SQLException.getSQLState isan SQL99 SQLSTATE value.
static intsqlStateXOpen 
          Apossible return value for themethod DatabaseMetaData.getSQLStateType whichis used to indicate whether the value returned by themethod SQLException.getSQLState isan X/Open (now know as Open Group) SQL CLI SQLSTATE value.
static shorttableIndexClustered 
          Indicatesthat this table index is a clustered index.
static shorttableIndexHashed 
          Indicatesthat this table index is a hashed index.
static shorttableIndexOther 
          Indicatesthat this table index is not a clustered index, a hashed index, ortable statistics; it is something other than these.
static shorttableIndexStatistic 
          Indicatesthat this column contains table statistics that are returned inconjunction with a table's index descriptions.

转载于:https://www.cnblogs.com/leeeee/p/7276705.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值