Chapter 7 Ensuring Data Integrity; Data Integrity Overview; How Data Can Become Invalid - Sybase Adaptive Server IQ 12.4.2 Administration And Performance Manual

Table of Contents

Advertisement

C H A P T E R
7
About this chapter

Data integrity overview

How data can become invalid

Incorrectly formatted
information
Duplicated data
Ensuring Data Integrity
This chapter describes facilities for ensuring that the data in your database
is valid and reliable. These facilities include constraints on tables and
columns, and choosing appropriate data types.
The SQL statements in this chapter use the CREATE TABLE statement
and ALTER TABLE statement, basic forms of which were introduced in
Chapter 3, "Working with Database Objects"
For data to have integrity means that the data is valid—that is, correct and
accurate—and that the relational structure of the database is intact. The
relational structure of the database is described through referential
integrity constraints, business rules that maintain the consistency of data
between tables.
Adaptive Server IQ supports stored procedures and JDBC, which allow
you detailed control over how data gets entered into the database.
Procedures are discussed in Chapter 6, "Using Procedures and Batches"
See the Adaptive Server Anywhere User's Guide for information on JDBC.
Here are a few examples of how the data in a database may become invalid
if proper checks are not made. Each of these examples can be prevented
by facilities described in this chapter.
An operator enters text where numeric data is required.
An operator enters numeric data that is too wide for the column.
A new department has been created, with
be added to the department table of the organization's database—but
two people enter this information into the table.
200, and needs to
dept_id
273

Advertisement

Table of Contents
loading

Table of Contents