  | 
»  | 
 | 
  
 | 
 | 
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 Name | Type | Length | Description | 
|---|
 | RULENAME | CHAR | 20 | Name of the rule |  | OWNER | CHAR | 20 | Owner of the target table and rule |  | TABLENAME | CHAR | 20 | Name of the target table |  | OLDNAME | CHAR | 20 | Old Correlation NAME |  | NEWNAME | CHAR | 20 | New Correlation NAME |  | DELETE | CHAR | 2 | 
DELETE applicable for this rule
Y Yes
N No
  |  | INSERT | CHAR | 2 | 
INSERT applicable for this rule
Y Yes
N No
  |  | UPDATE | CHAR | 2 | 
UPDATE applicable for this rule
Y Yes on all columns
N No on any columns
C Yes on specific columns only
  |  | NUMC | INTEGER | 4 | Number of columns applicable for UPDATE on this rule |  | CTIME | CHAR | 16 | Time of creation: yyyymmddhhmmsstt
 |  | DBEFILESET | CHAR | 20 | Name 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
 
  |  
  
 |