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

System.Rule

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

SYSTEM.RULE contains detailed information about the rules defined for database tables.

Initially, the table is empty. ALLBASE/SQL updates this table when processing a CREATE RULE, DROP RULE, or TRANSFER OWNERSHIP statement that affects a rule.

This table is accessed whenever an INSERT, UPDATE, or DELETE is performed on a table to determine whether any rules need to be enforced. If there is a rule for the table that is enforced at UPDATE time, the SYSTEM.RULECOLUMN table is also checked.

Table 8-28 System.Rule

Column NameTypeLengthDescription
RULENAMECHAR20Name of the rule
OWNERCHAR20Owner of the target table and rule
TABLENAMECHAR20Name of the target table
OLDNAMECHAR20Old Correlation NAME
NEWNAMECHAR20New Correlation NAME
DELETECHAR2

DELETE applicable for this rule Y Yes N No

INSERTCHAR2

INSERT applicable for this rule Y Yes N No

UPDATECHAR2

UPDATE applicable for this rule Y Yes on all columns N No on any columns C Yes on specific columns only

NUMCINTEGER4Number of columns applicable for UPDATE on this rule
CTIMECHAR16Time of creation: yyyymmddhhmmsstt
DBEFILESETCHAR20Name of the DBEFileSet containing the rule's definition and stored sections

 

Example



   select ruleNAME, owner, tableNAME, oldNAME from system.rule;                    

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

   RULENAME            |OWNER               |TABLENAME           |OLDNAME          

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

   INSERTREPORT        |PURCHDB             |REPORTS             |OLD              

   DELETEREPORT        |PURCHDB             |REPORTS             |OLD              

   UPDATEREPORT        |PURCHDB             |REPORTS             |OLD              

   CHECKVENDOR         |PURCHDB             |VENDORS             |OLD

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

   First 4 rows have been selected.

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

   



   select newName, delete, insert, update,numc, ctime from system.rule;            

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

   NEWNAME             |DELETE|INSERT|UPDATE|NUMC       |CTIME                     

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

   NEW                 |N     |Y     |N     |          0|1991121013511100          

   NEW                 |Y     |N     |N     |          0|1991121013511200          

   NEW                 |N     |N     |C     |          2|1991121013511200          

   NEW                 |Y     |N     |N     |          0|1991121216034600



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

   First 4 rows have been selected.

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

 

   select dbefileset from system.rule;            

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

   DBEFILESET          

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

   PURCHFS

   PURCHFS

   PURCHFS

   PURCHFS

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

   First 4 rows have been selected.

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

 
Feedback to webmaster