Collection Contents Index SYSSUBSCRIPTION system table SYSTABLEPERM system table pdf/chap15.pdf

Reference Manual
   CHAPTER 15. System Tables     

SYSTABLE system table


Column name

Column type

Column constraint

Table constraints

table_id

SMALLINT

NOT NULL

Primary key

file_id

SMALLINT

NOT NULL

Foreign key references SYS.SYSFILE

count

INTEGER

NOT NULL

first_page

INTEGER

NOT NULL

last_page

INTEGER

NOT NULL

primary_root

INTEGER

NOT NULL

creator

SMALLINT

NOT NULL

Foreign key references SYS.SYSUSERPERM. user_id

table_name

CHAR(128)

NOT NULL

table_type

CHAR(10)

NOT NULL

view_def

LONG VARCHAR

remarks

LONG VARCHAR

replicate

CHAR(1)

NOT NULL

"existing_obj"

CHAR(1)

remote_location

LONG VARCHAR

remote_objtype

CHAR(1)

srvid

INTEGER

Foreign key references SYS.SYSSERVERS

Each row of SYSTABLE describes one table or view in the database.

table_id     Each table or view is assigned a unique number (the table number) which is the primary key for SYSTABLE.

file_id     Indicates which database file contains the table. The file_id is a FOREIGN KEY for SYSFILE.

count     The number of rows in the table is updated during each successful CHECKPOINT. This number is used by Adaptive Server Anywhere when optimizing database access. The count is always 0 for a view.

first_page     Each database is divided into a number of fixed-size pages. This value identifies the first page that contains information for this table, and is used internally to find the start of this table. The first_page is always 0 for a view.

last_page     The last page that contains information for this table. The last_page is always 0 for a view.

primary_root     Primary keys are stored in the database as B-trees. The primary_root locates the root of the B-tree for the primary key for the table. It will be 0 for a view and, for a table with no primary key.

creator     The user number of the owner of the table or view. The name of the user can be found by looking in SYSUSERPERM.

table_name     The name of the table or view. One creator cannot have two tables or views with the same name.

table_type     This column is BASE for base tables, VIEW for views, and be GBL TEMP for global temporary tables. No entry is created for local temporary tables.

view_def     For a view, this column contains the CREATE VIEW command that was used to create the view. For a table, this column contains any CHECK constraints for the table.

remarks     A comment string.

replicate     (Y/N) Indicates whether the table is a primary data source in a Replication Server installation.

existing_obj     (Y/N) Indicates whether the table previously existed or not.

remote_location     Indicates the storage location of the remote object.

remote_objtype     Indicates the type of remote object: 'T' if table; 'V' if view; 'R' if rpc; 'B' if JavaBean.

srvid     The unique ID for the server.


Collection Contents Index SYSSUBSCRIPTION system table SYSTABLEPERM system table pdf/chap15.pdf