Catalog Tables

  • SYSTABLES
  • SYSCOLUMNS
  • SYSVIEWS
  • SYSINDEXES
  • SYSFOREIGNKEYS
  • SYSKEYS
  • SYSREFERENCES

  • SYSTABLES contains one row for each table, view, and catalog table.

    Attribute Type Description
    tabName varchar(25) Name of the table
    type varchar(1) The type of table (T for real table, V for view)
    colCount integer The number of columns in the table
    nPag integer The number of pages currently being used
    nReg integer The number of records currently being used
    lReg integer The maximum length of the records in the table

    Top

    JRS Architecture


    SYSCOLUMNS contains one row for each column in a table

    Attribute Type Description
    name varchar(25) Name of the column
    tabName varchar(25) Name of the table in which the column is found
    colNum integer Sequence number of the column in the table
    colType varchar(12) Data type of the column (integer, varchar(n))
    isNull varchar(1) If the column has been defined as NOT NULL, the value is F, otherwise T.
    isKey varchar(1) If the column occurs within a key of the table (T = true, F = false)

    Top

    JRS Architecture


    SYSVIEWS contains one or more rows for each view. The number of rows depends on the view definition length.

    Attribute Type Description
    viewName varchar(25) Name of the view
    text varchar(50) The view formula (SELECT statement)

    Top

    Index


    SYSINDEXES contains one row for each index created.

    Attribute Type Description
    idxName varchar(25) Name of the index
    tabName varchar(25) Name of the table on which the index is defined
    isUnique varchar(1) Whether the index is UNIQUE (T = true, F = false)
    colCount integer The number of columns in the index
    nLeaf integer The number of leaf pages currently being used
    nKey integer The number of distinct key values in the index
    isClustered varchar(1) Whether the index is clustered (T = true, F = false)
    type varchar(1) Type of index (U = created by the user; P = for primary key; F = for foreign key; Q = for key UNIQUE)

    Top

    JRS Architecture


    SYSFOREIGNKEYS contains one row for each column belonging to a foreign key.

    Attribute Type Description
    tabName varchar(25) Name of the table in which the foreign key is defined
    keyName varchar(20) Name of the foreign key
    colCount integer The number of columns in the foreign key
    colNum integer Sequence number of the column in the table
    ColName varchar(20) Name of the column
    colSeq integer Sequence number of the column in the foreign key

    Top

    JRS Architecture


    SYSKEYS contains one row for each column belonging to an index.

    Attribute Type Description
    idxName varchar(25) Name of the index
    colName varchar(25) Name of the column
    colSeq integer Sequence number of the column in the index
    ordering varchar(1) Type of ordering (A = ascending, D = descending)
    minVal varchar(20) Minimum value of a column of numeric type
    maxVal varchar(20) Maximum value of a column of numeric type
    type varchar(1) Type of index (U = created by the user; P = for primary key; F = for foreign key; Q = for key UNIQUE)

    Top

    JRS Architecture


    SYSREFERENCES contains one row for each foreign key.

    Attribute Type Description
    tabName varchar(25) Name of the table in which the foreign key is defined
    keyName varchar(25) Name of the foreign key
    refTabName varchar(25) Name of the referenced table (this is the table with the primary key)
    refKeyName varchar(25) Name of the primary key in the referenced table
    onDelete varchar(1) Action on DELETE on the referenced table (C = cascade, N = no action, S = set null)
    onUpdate varchar(1) Action on UPDATE on the referenced table (C = cascade, N = no action, S = set null)


    Top

    JRS Architecture