HPlogo ALLBASE/SQL Reference Manual: HP 9000 Computer Systems

Chapter 4 Constraints, Procedures, and Rules

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Table of Contents

Using Integrity Constraints
Unique Constraints
Referential Constraints
Check Constraints
Examples of Integrity Constraints
Inserting Rows in Tables Having Constraints
How Constraints are Enforced
Using Procedures
Understanding Procedures
Creating Procedures
Executing Procedures
Procedures and Transaction Management
Using SQL Statements in Procedures
Queries inside Procedures
Using a Procedure Cursor in ISQL
Error Handling in Procedures Not Invoked by Rules
Using RAISE ERROR in Procedures
Recommended Coding Practices for Procedures
Using Rules
Understanding Rules
Creating Rules
Techniques for Using Procedures with Rules
Error Handling in Procedures Invoked by Rules
Using RAISE ERROR in Procedures Invoked by Rules
Enabling and Disabling Rules
Special Considerations for Procedures Invoked by Rules
Differences between Rules and Integrity Constraints

In addition to the basic tables and indexes in a DBEnvironment, ALLBASE/SQL lets you create database objects known as constraints, procedures, and rules, which provide for a high degree of data consistency and integrity inside the DBEnvironment without the need for extensive application programming. Constraints define conditions on the rows of a table; procedures define sequences of SQL statements that can be stored in the DBEnvironment and applied as a group either through rules or through execution by specific users; and rules let you define complex relationships among tables by tying specific procedures to particular kinds of data manipulation on tables. Together, these tools let you store many of your organization's business rules in the DBEnvironment itself, reducing the need for application code.

This chapter presents the following topics:

  • Using Integrity Constraints

  • Using Procedures

  • Using Rules

Feedback to webmaster