Contents Index How database contents change SQL statements for implementing integrity constraints

ASA SQL User's Guide
  Ensuring Data Integrity
    Data integrity overview

Data integrity tools


To maintain data integrity, you can use defaults, data constraints, and constraints that maintain the referential structure of the database.

Defaults 

You can assign default values to columns to make certain kinds of data entry more reliable. For example:

For more information on these and other column defaults, see Using column defaults.

Constraints 

You can apply several types of constraints to the data in individual columns or tables. For example:

As well, column constraints can be inherited from domains. For more information on these and other table and column constraints, see Using table and column constraints.

Entity and referential integrity 

Relationships, defined by the primary keys and foreign keys, tie together the information in relational database tables. You must build these relations directly into the database design. The following integrity rules maintain the structure of the database:

For more information about enforcing referential integrity, see Enforcing entity and referential integrity. For more information about designing appropriate primary and foreign key relations, see Designing Your Database.

Triggers for advanced integrity rules 

You can also use triggers to maintain data integrity. A trigger is a procedure stored in the database and executed automatically whenever the information in a specified table changes. Triggers are a powerful mechanism for database administrators and developers to ensure that data remains reliable.

For more information about triggers, see Using Procedures, Triggers, and Batches.


Contents Index How database contents change SQL statements for implementing integrity constraints