Hitachi

Hitachi Advanced Database Setup and Operation Guide


11.1.13 Checking the definition information for a base table (searching a dictionary table)

By searching a dictionary table, you can check the definition information of a base table.

Note

For details about the contents of each dictionary table, see B. Dictionary Tables. For an example of searching a dictionary table, see B.22 Searching a dictionary table.

The following table lists the dictionary tables and the base table definition information that can be checked from the dictionary tables.

Table 11‒2: Dictionary tables and the base table definition information that can be checked

No.

Dictionary table

Base table definition information that can be checked

1

SQL_TABLES table

By searching the SQL_TABLES table, you can check the following definition information:

  • Table name

    Check the TABLE_SCHEMA column (schema name) and TABLE_NAME column (table identifier).

  • Specification content of the PCTFREE table option

    Check the FREE_AREA column (percentage of unused area in the table pages).

  • Whether the BRANCH ALL table option is specified

    Check the IS_BRANCH_ALL column (specification of the BRANCH ALL table option).

  • Table type (single-chunk table or multi-chunk table)

    Check the specification of the IS_CHUNK column (CHUNK specification in the chunk specification).

  • Maximum number of chunks created in a multi-chunk table

    Check the N_CHUNK_RESERVED column (maximum number of chunks that can be created).

  • Whether the column is an archivable multi-chunk table

    Check the IS_ARCHIVABLE column (whether a chunk-archive specification exists).

  • Path name of the archive directory

    Check the ARCHIVE_DIRECTORY_PATH column (absolute path to the archive directory).

  • Table type (row store table or column store table)

    Check the STORAGE_FORMAT column (table-data storage format).

For details about the SQL_TABLES table, see B.2 Content of SQL_TABLES.

2

SQL_COLUMNS table

By searching the SQL_COLUMNS table, you can check the following definition information:

  • Column name

    Check the COLUMN_NAME column (column name).

  • Data type and definition length of a column

    Check the DATA_TYPE_CODE column (data type of a column) and DATA_LENGTH column (definition length of a column).

  • Specification content of the DEFAULT clause

    Check the IS_DEFAULT_COLUMN column (whether the DEFAULT clause is specified) and DEFAULT_VALUE column (default value specified for the DEFAULT clause).

  • Whether BRANCH is specified

    Check the BRANCH column (value specified for BRANCH in the column definition).

  • Specification content of a primary key

    Check the IS_PRIMARY_KEY_COLUMN column (whether the column is a member of columns that comprise the primary key), and the PRIMARY_KEY_COLUMN_SEQUENCE_NUMBER column (column order of the primary key).

  • Whether the column is an archive range column

    Check the IS_ARCHIVE_RANGE_COLUMN column (whether the column is an archive range column).

  • Value specified as the column-data compression type during definition of a column store table

    Check the COMPRESSION_TYPE column (value specified for COMPRESSION TYPE in the column definition).

For details about the SQL_COLUMNS table, see B.3 Content of SQL_COLUMNS.

3

  • SQL_DIV_TABLE table

  • SQL_DBAREAS table

By searching the tables on the left, you can check the following definition information:

  • DB area ID of the DB area that stores the table

    Check the DBAREA_ID column of the SQL_DIV_TABLE table (DB area ID of the DB area that stores the table).

  • DB area name of a DB area

    Check the DBAREA_NAME column (DB area name) of the SQL_DBAREAS table based on the DB area ID checked in the SQL_DIV_TABLE table.

For details about the SQL_DIV_TABLE table, see B.4 Content of SQL_DIV_TABLE.

For details about the SQL_DBAREAS table, see B.7 Content of SQL_DBAREAS.

4

  • SQL_TABLE_CONSTRAINTS table

  • SQL_KEY_COLUMN_USAGE table

  • SQL_REFERENTIAL_CONSTRAINTS table

By searching the tables on the left, you can check the following definition information:

  • Information related to constraints on a base table (whether primary keys and foreign keys exist)

    See the SQL_TABLE_CONSTRAINTS table.

    For details about the SQL_TABLE_CONSTRAINTS table, see B.14 Content of SQL_TABLE_CONSTRAINTS.

  • Information related to columns comprising the primary key and foreign keys

    See the SQL_KEY_COLUMN_USAGE table.

    For details about the SQL_KEY_COLUMN_USAGE table, see B.16 Content of SQL_KEY_COLUMN_USAGE.

  • Information related to referential constraints

    See the SQL_REFERENTIAL_CONSTRAINTS table.

    For details about the SQL_REFERENTIAL_CONSTRAINTS table, see B.17 Content of SQL_REFERENTIAL_CONSTRAINTS.