Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Usage » Ensuring Data Integrity » Introduction to data integrity

How database contents change Next Page

Data integrity tools

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


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.


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.