CHAPTER 7 Ensuring Data Integrity
275
See “Creating tables” for more information on how constraints affect
optimization. For more on join indexes and foreign keys, see “Using join
indexes”.
Constraints and Load
Operations
Adaptive Server IQ checks during load operations that certain constraints are
obeyed:
•
Adaptive Server IQ ensures that data being loaded is the appropriate data
type and length.
•
If you have a join index that relies on a foreign key-primary key
relationship, when synchronizing the join index Adaptive Server IQ
checks that data in the underlying tables maintains the expected one-to-
many relationship between the joined columns.
How database contents get changed
Information in database tables is changed by submitting SQL statements from
client applications. Only a few SQL statements actually modify the
information in a database.
•
An existing row of a table may be deleted, using the
DELETE
statement.
•
A new row may be inserted into a table, using the
INSERT
statement.
Data integrity tools
To assist in maintaining data integrity, you can use data constraints, and
constraints that specify the referential structure of the database.
Constraints
You can use several types of constraints on the data in individual columns or
tables. For example:
•
A NOT NULL constraint prevents a column from containing a null entry.
Adaptive Server IQ enforces this constraint.
•
Columns can have unenforced CHECK conditions assigned to them, to
specify that a particular condition should be met by every item in the
column. You could specify, for example, that salary column entries should
be within a specified range.
•
Unenforced CHECK conditions can be made on the relative values in
different columns, to specify, for example, in a library database that a
date_returned
entry is later than a
date_borrowed
entry.
Summary of Contents for Adaptive Server IQ 12.4.2
Page 1: ...Administration and Performance Guide Adaptive Server IQ 12 4 2 ...
Page 16: ...xvi ...
Page 20: ...Related documents xx ...
Page 40: ...Compatibility with earlier versions 20 ...
Page 118: ...Troubleshooting startup shutdown and connections 98 ...
Page 248: ...Importing data by replication 228 ...
Page 306: ...Integrity rules in the system tables 286 ...
Page 334: ...Cursors in transactions 314 ...
Page 396: ...Users and permissions in the system tables 376 ...
Page 438: ...Determining your data backup and recovery strategy 418 ...
Page 484: ...Network performance 464 ...
Page 500: ...System utilities to monitor CPU use 480 ...
Page 514: ...Characteristics of Open Client and jConnect connections 494 ...
Page 536: ...Index 516 ...