Objects, Keys, Indices, and Sequences

sys.objects

nametypereferencesdescription
"id"INTEGERThe internal object identifier. Primary key of this table is the combination of "id" and "nr".
"name"VARCHARThe SQL name.
"nr"INTEGERPosition within the object list.

sys.keys

nametypereferencesdescription
"id"INTEGERsys.objects.idThe unique internal key identifier.
"table_id"INTEGERsys.tables.idThe corresponding table identifier.
"type"INTEGERsys.key_types.key_type_idKey type id: 0=Primary Key, 1=Unique Key, 2=Foreign Key, 3=Unique Key with Nulls Not Distinct, 4=Check Constraint, see table sys.key_types.
"name"VARCHARThe SQL name given to the key.
"rkey"INTEGERsys.keys.id when rkey > 0Related primary key or unique constraint id. -1 if not applicable.
"action"INTEGERThe combined foreign key on UPDATE and on DELETE rule action codes. See sys.fkeys for easier access to the rule action values.
"check"VARCHARThe relational plan and SQL expression of the check constraint. Tip: To extract the SQL expression query "check_clause" from "information_schema"."check_constraints".

sys.key_types

nametypereferencesdescription
"key_type_id"SMALLINTThe unique internal identifier of a key type.
"key_type_name"VARCHARA description of the key type.
key_type_idkey_type_name
0Primary Key
1Unique Key
2Foreign Key
3Unique Key With Nulls Not Distinct
4Check Constraint

sys.fkeys

nametypereferencesdescription
"id"INTEGERsys.objects.idThe unique internal key identifier.
"table_id"INTEGERsys.tables.idThe corresponding table identifier.
"type"INTEGERsys.key_types.key_type_idKey type id: 2=Foreign Key, see table sys.key_types.
"name"VARCHARThe SQL name given to the foreign key.
"rkey"INTEGERsys.keys.idRelated primary key or unique constraint id.
"update_action_id"SMALLINTsys.fkey_actions.action_idThe foreign key UPDATE rule action code: 0=NO ACTION, 1=CASCADE, 2=RESTRICT, 3=SET NULL, 4=SET DEFAULT.
"update_action"VARCHARsys.fkey_actions.action_nameThe derived foreign key UPDATE rule name.
"delete_action_id"SMALLINTsys.fkey_actions.action_idThe foreign key DELETE rule action code: 0=NO ACTION, 1=CASCADE, 2=RESTRICT, 3=SET NULL, 4=SET DEFAULT.
"delete_action"VARCHARsys.fkey_actions.action_nameThe derived foreign key DELETE rule action name.

sys.fkey_actions

nametypereferencesdescription
"action_id"SMALLINTThe unique internal identifier of an action type.
"action_name"VARCHARThe action name, as used in SQL foreign key constraints.
action_idaction_name
0NO ACTION
1CASCADE
2RESTRICT
3SET NULL
4SET DEFAULT

sys.idxs

nametypereferencesdescription
"id"INTEGERsys.objects.idThe unique internal index identifier.
"table_id"INTEGERsys.tables.idThe corresponding table identifier.
"type"INTEGERsys.index_types.index_type_idThe corresponding index type identifier, see table sys.index_types.
"name"VARCHARThe SQL name.

sys.index_types

nametypereferencesdescription
"index_type_id"SMALLINTThe unique internal identifier of an index type.
"index_type_name"VARCHARA description of the index type.
index_type_idindex_type_name
0Hash
1Join
2Order preserving hash
3No-index
4Imprint
5Ordered

sys.sequences

nametypereferencesdescription
"id"INTEGERThe unique internal sequence identifier.
"schema_id"INTEGERsys.schemas.idThe corresponding schema identifier.
"name"VARCHARThe SQL name.
"start"BIGINTThe start value of the sequence.
"minvalue"BIGINTThe minimal value of the sequence.
"maxvalue"BIGINTThe maximal value of the sequence.
"increment"BIGINTThe sequence increment value.
"cacheinc"BIGINTThe increment to ease transaction management.
"cycle"BOOLEANThe repeat the sequence upon hitting its bounds.