HPlogo ALLBASE/SQL Database Administration Guide: HP 3000 MPE/iX Computer Systems > Chapter 8  System Catalog

System.Constraintcol

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

SYSTEM.CONSTRAINTCOL contains information about the columns used in PRIMARY KEY, UNIQUE, and FOREIGN KEY integrity constraints.

Initially, the table is empty since the system catalog does not use integrity constraints. ALLBASE/SQL updates this table when processing a CREATE TABLE, DROP TABLE, or TRANSFER OWNERSHIP statement involving an integrity constraint.

This table is accessed whenever an INSERT, type II INSERT, UPDATE, or DELETE is performed on a table in the CONSTRAINT table to determine if the constraint needs to be enforced. It is accessed whenever a REVOKE, REMOVE FROM GROUP, or DROP GROUP statement is performed to determine whether the constraint columns depend on the current authorization scheme.

Table 8-9 System.ConstraintCol

Column NameTypeLengthDescription
CONSTRAINTNAMECHAR20Name of the constraint containing this column
OWNERCHAR20Owner of the constraint
COLUMNNAMECHAR20Name of a column used in the constraint
POSITIONINTEGER4Position of the occurrence of the column in the constraint, numbered 1, 2, ... n, where n is the value of NUMC in the SYSTEM.CONSTRAINT tuple for this constraint.

 

Example



   SELECT * FROM System.ConstraintCol;

   --------------------+--------------------+--------------------+-----------

   CONSTRAINTNAME      |OWNER               |COLUMNNAME          |POSITION

   --------------------+--------------------+--------------------+-----------

   SQLCON_00000001P00  |PURCHDB             |PARTNUM             |       1

   CLUBS_PK            |RECDB               |CLUBNAME            |       1

   MEMBERS_PK          |RECDB               |MEMBERNAME          |       1

   MEMBERS_PK          |RECDB               |CLUB                |       2

   MEMBERS_FK          |RECDB               |CLUB                |       1

   EVENTS_FK           |RECDB               |COORDINATOR         |       1

   EVENTS_FK           |RECDB               |SPONSORCLUB         |       2

   ---------------------------------------------------------------------------

   Number of rows selected is 7

   U[p], d[own], l[eft], r[ight], t[op], b[ottom], pr[int] <n>, or e[nd]> r


Feedback to webmaster