Hitachi

Hitachi Advanced Database Setup and Operation Guide


B.2 Content of SQL_TABLES

SQL_TABLES stores table definition information of base tables, viewed tables, dictionary tables, dictionary tables (base tables), system tables, and system tables (base tables). Each row stores information for one table.

The following table describes the content of SQL_TABLES.

Table B‒3: Content of SQL_TABLES

No.

Column name

Data type

Stored information

1

TABLE_SCHEMA

VARCHAR(100)

Schema name

2

TABLE_NAME

VARCHAR(100)

Table identifier

3

TABLE_TYPE

CHAR(1)

Table type:

  • 'R': Base table

  • 'V': Viewed table

4

TABLE_ID

SMALLINT

Table ID:

  • From 0x00020001: Dictionary tables (base tables)

  • From 0x000200C9: System tables (base tables)

  • From 0x00020191: Base tables defined by HADB users

  • From 0x00040001: Dictionary tables and system tables

  • From 0x00040401: Viewed tables defined by HADB users

5

N_COLS

SMALLINT

Number of columns in the table

6

N_INDEX

SMALLINT

Number of indexes defined for the table (sum of all indexes)

7

CREATE_TIME

TIMESTAMP

Datetime stamp indicating when the table was defined.

8

N_NOTNULL

SMALLINT

Number of columns for which the NOT NULL constraint is specified

9

FREE_AREA

SMALLINT

Percentage of unused area in the table pages

10

FIX_TABLE

CHAR(1)

Whether this is a FIX table:

  • 'F': FIX table

  • 'N': Not a FIX table

11

ROW_LENGTH

SMALLINT

FIX table row length.

For dictionary tables (base tables), system tables (base tables), or tables that are not FIX tables, the null value is stored.

12

IS_BRANCH_ALL

CHAR(1)

Whether the BRANCH ALL table option is specified:

  • 'Y': A table with BRANCH ALL specified

  • 'N': A table without BRANCH ALL specified

13

N_RANGE_INDEX

SMALLINT

Number of range indexes defined for a table.

14

IS_CHUNK

CHAR(1)

Specification of CHUNK chunk specification

  • 'Y': Specified (multi-chunk table)

  • 'N': Not specified (single chunk table)

15

N_CHUNK_RESERVED

SMALLINT

Maximum number of chunks to be created

This value stores a CHUNK specification value. In the case of single chunk tables and viewed tables, a null value is stored.

16

N_DEFAULT_COLUMN

SMALLINT

Number of columns for which the DEFAULT clause is specified

Stores the number of columns for which the DEFAULT clause was specified when a base table was defined.

For viewed tables, dictionary tables (base tables), system tables (base tables), and base tables without the DEFAULT clause specified, the null value is stored.

17

N_PRIMARY_KEY_COLUMN

SMALLINT

Number of columns comprising the primary key

Stores the number of columns comprising the primary key that was defined when a base table was defined.

For viewed tables, dictionary tables (base tables), system tables (base tables), and base tables without the primary key specified, the null value is stored.

18

N_FOREIGN_KEY

SMALLINT

Number of foreign keys

Store the number of foreign keys defined for a base table.

The null value is stored for the following tables:

  • Viewed table

  • Dictionary table (base table)

  • System table (base table)

  • Base table for which no foreign key is defined

19

N_REFERENCING_KEY

SMALLINT

Number of foreign keys that reference a primary key

Stores the number of foreign keys that reference a primary key defined for this base table.

The null value is stored for the following tables:

  • Viewed table

  • Dictionary table (base table)

  • System table (base table)

  • Base table that has no foreign key that references a primary key

  • Base table for which no primary key is defined

20

N_FOREIGN_KEY_COLUMN

SMALLINT

Number of columns comprising foreign keys

Stores the total number of columns comprising the foreign keys defined for the base table.

The null value is stored for the following tables:

  • Viewed table

  • Dictionary table (base table)

  • System table (base table)

  • Base table for which no foreign key is defined

21

N_TEXT_INDEX

SMALLINT

Number of text indexes defined for the table.

The null value is stored for the following tables:

  • Viewed table

  • Dictionary table (base table)

  • System table (base table)

  • Table for which no text index is defined

22

IS_ARCHIVABLE

CHAR(1)

Is there a chunk archive specification?

  • 'Y'

    There is a chunk archive specification (it is an archivable multi-chunk table)

  • Null value

    There is no chunk archive specification (it is a base table other than an archivable multi-chunk table)

The null value is stored for the following tables:

  • Viewed table

  • Dictionary table (base table)

  • System table (base table)

23

ARCHIVE_DIRECTORY_PATH

VARCHAR(400)

Absolute path of the archive directory

The null value is stored for the following tables:

  • Viewed table

  • Dictionary table (base table)

  • System table (base table)

  • Base table other than an archivable multi-chunk table

24

RECREATE_TIME

TIMESTAMP

Execution date and time of the ALTER VIEW statement

The time stamp of the latest ALTER VIEW statement execution for the viewed table is stored.

The null value is stored for the following tables:

  • Base tables

  • Viewed tables for which an ALTER VIEW statement has not been executed

25

STORAGE_FORMAT

VARCHAR(32)

Table-data storage format

  • 'COLUMN'

    Column store format

  • 'ROW'

    Row store format

In the case of a viewed table, a null value is stored.