RDB$RELATIONS

From InterBase

Go Up to System Tables


RDB$RELATIONS defines some of the characteristics of tables and views. Other characteristics, such as the columns included in the table and a description of each column, are stored in the RDB$RELATION_FIELDS table.

RDB$RELATIONS
Column name Data Type Length Description

RDB$VIEW_BLR

BLOB

Subtype BLR: For a view, contains the BLR (Binary Language Representation) of the query InterBase evaluates at the time of execution.

RDB$VIEW_SOURCE

BLOB

Subtype Text: For a view, contains the original source query for the view definition.

RDB$DESCRIPTION

BLOB

Subtype Text: Contains a user-written description of the table being defined.

RDB$RELATION_ID

SMALLINT

Contains the internal identification number used in BLR (Binary Language Representation) requests; do not modify this column.

RDB$SYSTEM_FLAG

SMALLINT

Indicates the contents of a table, either:

  • User-data (value of 0)
  • System information (value greater than 0)

Do not set this column to 1 when creating tables.

RDB$DBKEY_LENGTH

SMALLINT

Length of the database key.

Values are:

  • For tables: 8
  • For views: 8 times the number of tables referenced in the view definition.

Do not modify the value of this column.

RDB$FORMAT

SMALLINT

For InterBase internal use only; do not modify.

RDB$FIELD_ID

SMALLINT

The number of columns in the table; this column is maintained by InterBase: do not modify the value of this column.

RDB$RELATION_NAME

CHAR

67

The unique name of the table defined by this row

RDB$SECURITY_CLASS

CHAR

67

Security class defined in the RDB$SECURITY_CLASSES table; access controls defined in the security class apply to all uses of this table.

RDB$EXTERNAL_FILE

VARCHAR

253

The file in which the external table is stored; if this is blank, the table does not correspond to an external file.

RDB$RUNTIME

BLOB

Subtype Summary: Describes table metadata; used for performance enhancement.

RDB$EXTERNAL_DESCRIPTION

BLOB

Subtype EXTERNAL_FILE_DESCRIPTION; user-written description of the external file.

RDB$OWNER_NAME

CHAR

67

Identifies the creator of the table or view; the creator is considered the owner for SQL security (GRANT/REVOKE) purposes.

RDB$DEFAULT_CLASS

CHAR

67

Default security class that InterBase applies to columns newly added to a table using the SQL security system.

RDB$FLAGS

SMALLINT

  • 1 = SQL-defined table
  • 2 = Global temporary table
  • 4 = <reserved for future use>
  • 8 = Delete temporary rows on commit
  • 16 = Preserve temporary rows on commit; rows are deleted on database detach
  • 32 = Indicates one or more subscriptions on the relation

RDB$DATA_BLOCKING_FACTOR

SMALLINT

ODS 15 creates a new column which stores a table-specific record blocking factor. It is set during GBAK restore based on the characteristics of the restored data.

If a table does not have a table-specific data blocking factor, this system column queries as NULL.

RDB$BLOB_BLOCKING_FACTOR

SMALLINT

ODS 15 creates a new column which stores a table-specific blob blocking factor. It is set during GBAK restore based on the characteristics of the restored blobs.

If a table does not have a table-specific blob blocking factor, this system column queries as NULL.

Note: If a table has Blob columns and no indexes defined, then the table uses the database-wide blocking factor as before.