Collection Contents Index Enforcing entity and referential integrity CHAPTER 15.  Using Transactions and Locks pdf/chap14.pdf

User's Guide
   PART 2. Relational Database Concepts
     CHAPTER 14. Ensuring Data Integrity       

Integrity rules in the system tables


All the information about integrity checks and rules in a database is held in the following system tables:

System table

Description

SYS.SYSTABLE

CHECK constraints are held in the view_def column of SYS.SYSTABLE. For views, the view_def holds the CREATE VIEW command that created the view. You can check whether a particular table is a base table or a view by looking at the table_type column, which is BASE or VIEW.

SYS.SYSTRIGGER

Referential integrity actions are held in SYS.SYSTRIGGER. The referential_action column holds a single character indicating whether the action is cascade (C), delete (D), set null (N), or restrict (R). The event column holds a single character specifying the event that causes the action to occur: a delete (D), insert (I), update (U), or update of column-list (C). The trigger_time column shows whether the action occurs after (A) or before (B) the triggering event.

SYS.SYSFOREIGNKEYS

This view presents the foreign key information from the two tables SYS.SYSFOREIGNKEY and SYS.SYSFKCOL in a more readable format.

SYS.SYSCOLUMNS

This view presents the information from the SYS.SYSCOLUMN table in a more readable format. It includes default settings and primary key information for columns.

For Info     For a description of the contents of each system table, see System Tables. You can use Sybase Central or Interactive SQL to browse these tables and views.

For Info    


Collection Contents Index Enforcing entity and referential integrity CHAPTER 15.  Using Transactions and Locks pdf/chap14.pdf