FirebirdSQL logo

RDB$CHARACTER_SETS

RDB$CHARACTER_SETS names and describes the character sets available in the database.

Column Name Data Type Description

RDB$CHARACTER_SET_NAME

CHAR(63)

Character set name

RDB$FORM_OF_USE

CHAR(63)

Not used

RDB$NUMBER_OF_CHARACTERS

INTEGER

The number of characters in the set.Not used for existing character sets

RDB$DEFAULT_COLLATE_NAME

CHAR(63)

The name of the default collation for the character set

RDB$CHARACTER_SET_ID

SMALLINT

Unique character set identifier

RDB$SYSTEM_FLAG

SMALLINT

System flag: value is 1 if the character set is defined in the system when the database is created;value is 0 for a user-defined character set

RDB$DESCRIPTION

BLOB TEXT

Could store text description of the character set

RDB$FUNCTION_NAME

CHAR(63)

For a user-defined character set that is accessed via an external function, the name of the external function

RDB$BYTES_PER_CHARACTER

SMALLINT

The maximum number of bytes representing one character

RDB$SECURITY_CLASS

CHAR(63)

May reference a security class defined in the table RDB$SECURITY_CLASSES, to apply access control limits to all users of this character set

RDB$OWNER_NAME

CHAR(63)

The username of the user who created the character set originally

RDB$RELATIONS

RDB$RELATIONS stores the top-level definitions and attributes of all tables and views in the system.

Column Name Data Type Description

RDB$VIEW_BLR

BLOB BLR

The binary language representation (BLR) of the query specification of a view.The field stores NULL for a table

RDB$VIEW_SOURCE

BLOB TEXT

Contains the original source text of the query for a view, in SQL language.User comments are included.The field stores NULL for a table

RDB$DESCRIPTION

BLOB TEXT

Could store comments related to the table or view

RDB$RELATION_ID

SMALLINT

Internal identifier of the table or view

RDB$SYSTEM_FLAG

SMALLINT

indicates whether the table or view is user-defined (value 0) or system-defined (value 1 or greater)

RDB$DBKEY_LENGTH

SMALLINT

The total length of the database key.For a table: 8 bytes.For a view, the length is 8 multiplied by the number of tables referenced by the view

RDB$FORMAT

SMALLINT

Internal use, points to the relation’s record in RDB$FORMATS — do not modify

RDB$FIELD_ID

SMALLINT

The field ID for the next column to be added.The number is not decremented when a column is dropped.

RDB$RELATION_NAME

CHAR(63)

Table or view name

RDB$SECURITY_CLASS

CHAR(63)

May reference a security class defined in the table RDB$SECURITY_CLASSES, to apply access control limits to all users of this table or view

RDB$EXTERNAL_FILE

VARCHAR(255)

The full path to the external data file if the table is defined with the EXTERNAL FILE clause

RDB$RUNTIME

BLOB

Table metadata description, used internally for optimization

RDB$EXTERNAL_DESCRIPTION

BLOB

Could store comments related to the external file of an external table

RDB$OWNER_NAME

CHAR(63)

The username of the user who created the table or view originally

RDB$DEFAULT_CLASS

CHAR(63)

Default security class, used when a new column is added to the table

RDB$FLAGS

SMALLINT

Internal flags

RDB$RELATION_TYPE

SMALLINT

The type of the relation object being described:

0 - system or user-defined table
1 - view
2 - external table
3 - monitoring table
4 - connection-level GTT (PRESERVE ROWS)
5 - transaction-level GTT (DELETE ROWS)

RDB$SQL_SECURITY

BOOLEAN

The SQL SECURITY mode (DEFINER or INVOKER):

NULL - initial default (INVOKER)
FALSE - INVOKER
TRUE - DEFINER

RDB$RELATION_CONSTRAINTS

RDB$RELATION_CONSTRAINTS stores the definitions of all table-level constraints: primary, unique, foreign key, CHECK, NOT NULL constraints.

Column Name Data Type Description

RDB$CONSTRAINT_NAME

CHAR(63)

The name of the table-level constraint defined by the user, or otherwise automatically generated by the system

RDB$CONSTRAINT_TYPE

CHAR(11)

The name of the constraint type: PRIMARY KEY, UNIQUE, FOREIGN KEY, CHECK or NOT NULL

RDB$RELATION_NAME

CHAR(63)

The name of the table this constraint applies to

RDB$DEFERRABLE

CHAR(3)

Currently NO in all cases: Firebird does not yet support deferrable constraints

RDB$INITIALLY_DEFERRED

CHAR(3)

Currently NO in all cases

RDB$INDEX_NAME

CHAR(63)

The name of the index that supports this constraint.For a CHECK or a NOT NULL constraint, it is NULL.

RDB$RELATION_FIELDS

RDB$RELATION_FIELDS stores the definitions of table and view columns.

Column Name Data Type Description

RDB$FIELD_NAME

CHAR(63)

Column name

RDB$RELATION_NAME

CHAR(63)

The name of the table or view that the column belongs to

RDB$FIELD_SOURCE

CHAR(63)

Domain name on which the column is based, either a user-defined one specified in the table definition or one created automatically by the system using the set of attributes defined.The attributes are in the table RDB$FIELDS: this column matches RDB$FIELDS.RDB$FIELD_NAME.

RDB$QUERY_NAME

CHAR(63)

Not currently used

RDB$BASE_FIELD

CHAR(63)

Only populated for a view, it is the name of the column from the base table

RDB$EDIT_STRING

VARCHAR(127)

Not used

RDB$FIELD_POSITION

SMALLINT

The zero-based ordinal position of the column in the table or view, numbering from left to right

RDB$QUERY_HEADER

BLOB TEXT

Not used

RDB$UPDATE_FLAG

SMALLINT

Indicates whether the column is a regular one (value 1) or a computed one (value 0)

RDB$FIELD_ID

SMALLINT

An ID assigned from RDB$RELATIONS.RDB$FIELD_ID at the time the column was added to the table or view.It should always be treated as transient

RDB$VIEW_CONTEXT

SMALLINT

For a view column, the internal identifier of the base table from which this field derives

RDB$DESCRIPTION

BLOB TEXT

Comments related to the table or view column

RDB$DEFAULT_VALUE

BLOB BLR

The binary language representation (BLR) of the default value of the column

RDB$SYSTEM_FLAG

SMALLINT

Indicates whether the column is user-defined (value 0) or system-defined (value 1 or greater)

RDB$SECURITY_CLASS

CHAR(63)

May reference a security class defined in RDB$SECURITY_CLASSES, to apply access control limits to all users of this column

RDB$COMPLEX_NAME

CHAR(63)

Not used

RDB$NULL_FLAG

SMALLINT

Indicates whether the column is nullable (NULL) non-nullable (value 1)

RDB$DEFAULT_SOURCE

BLOB TEXT

The source text of the DEFAULT clause, if any

RDB$COLLATION_ID

SMALLINT

The identifier of the collation in the character set for the column, if it is not the default collation

RDB$GENERATOR_NAME

CHAR(63)

Internal generator name for generating an identity value for the column.

RDB$IDENTITY_TYPE

SMALLINT

The identity type of the column

NULL - not an identity column
0 - identity column, GENERATED ALWAYS
1 - identity column, GENERATED BY DEFAULT