## Ensuring Data Integrity

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).

· Key: a key comprising one or more columns can be defined for each table. The database system ensures that each key is unique. A key can also consist of columns of different data types (see key definition).

· UNIQUE definition: the uniqueness of the values in other columns and column combinations can also be ensured by using other mechanisms (see UNIQUE definition for "alternate keys").

· NOT NULL: by specifying NOT NULL, you can ensure that the NULL value is not accepted in individual columns (see column definition).

· DEFAULT definition: you can define default values for each column (see DEFAULT specification).

· Referential integrity conditions: by specifying referential integrity conditions, you can declare deletion and existence dependencies between the rows in two tables (see referential CONSTRAINT definition).

· Database procedures and triggers: complex integrity rules that require access to further tables can be formulated with database procedures or triggers.