Background documentationEnsuring Data Integrity Locate this document in the navigation structure

 

The database system provides you with the following tools to ensure data integrity:

  • Integrity rules: Integrity rules that refer to a table can also be specified (see CONSTRAINT definition).

  • Keys: A key consisting of one or more columns can be defined for each table. The database system ensures that keys in a table are unique. A key can also consist of columns of different data types (see key definition).

  • UNIQUE definition: In addition, uniqueness can be enforced for the values of other columns or column combinations (see UNIQUE definition for "alternate keys").

  • NOT NULL: For single columns, values other than the NULL value can be enforced by specifying NOT NULL (see column definition).

  • DEFAULT definition: You can define default values for each column (see DEFAULT specification).

  • Referential constraints: By specifying referential constraints, you can declare deletion and existence dependencies between the rows in two tables (see referential CONSTRAINT definition).

  • Database procedures and triggers: Complex integrity rules requiring access to more tables can be formulated using database procedures or triggers.