Databases Reference
In-Depth Information
Exhibit 56-2. Sample referential integrity controls.
relational database products allow users to code their own integrity con-
straints into database applications. With other products, SQL is used to
declare integrity constraints to the database; the database stores these
constraints in the data dictionary and automatically enforces them.
Transaction integrity controls are designed to ensure that a transaction
can be rolled back if it is not executed successfully in its entirety. For exam-
ple, if a financial posting involving a debit and credit transaction is not
completely executed and stored, it must be rolled back to the stage before
execution. To ensure transaction integrity, relational database products
provide such security features as online redo log files, rollback segments,
and distributed database recovery function.
Entity integrity controls identify each record in the database to ensure
that the record is unique. For example, an automated sequence generator
can be used to ensure unique primary key values in a relational database.
Value constraints can be used to check a data value to ensure that it falls
within the limit of a predefined constraint; for example, salaries in the
EMPLOYEE database table are checked to verify that they are within an
appropriate numeric range. Value constraints can be defined using SQL
when the table is created.
Stored Procedures
Enhanced relational database systems use stored procedures to access
and modify data in a consistent and secure manner. A stored procedure log-
ically groups a set of procedural language SQL statements that perform a
specific task when the procedure is executed. A trigger is a type of procedure
Search WWH ::




Custom Search