Ingres® 2006 - QUEL Reference Guide

Peter Kitson

ISBN : -

Order a printed copy of this book from Amazon --UNAVAILABLE--


Cover Design - Ingres® 2006 - QUEL Reference Guide
 

For your free electronic copy of this book please verify the numbers below. 

(We need to do this to make sure you're a person and not a malicious script)

Numbers

 




Sample Chapter From Ingres® 2006 - QUEL Reference Guide
     Copyright © Ingres Corporation



Chapter 2: Introduction to QUEL


QUEL is an Ingres proprietary query language. You use QUEL statements to manipulate and query the information in your database.

There are interactive and embedded releases of QUEL.

  •   Interactive QUEL enables you to enter QUEL statements from a terminal and display query results on the terminal screen.
  •   Embedded QUEL enables you to include QUEL statements in programs written in programming languages such as C or Fortran.
This chapter introduces the features of embedded and interactive QUEL.

Interactive QUEL

There are two ways to use interactive QUEL:
  •   The forms-based interactive terminal monitor is invoked by the iquel command. Enter QUEL statements into a form and select commands from a menu line.
  •   The command-based Terminal Monitor is invoked by the quel command. For details, see the appendix “Terminal Monitor.”

Embedded QUEL

Embedded QUEL (EQUEL) enables you to include QUEL statements in application programs. This guide refers to the programming language of the application as the host language.

For each host language, there is an EQUEL preprocessor. The preprocessor scans your source code for QUEL statements and translates the QUEL statements into the appropriate host language statements. For detailed information about language-dependent topics, see the Embedded QUEL Companion Guide.

In addition to the statements available to you in interactive QUEL, embedded QUEL offers the following features:

  Database cursors and transaction processing
Database cursors enable your application to process database rows that
fulfill specified search criteria. Transactions help you to preserve database
integrity by grouping QUEL statements; if a transaction fails for any
reason, the effects of all the statements in the transaction are undone.

  Dynamic programming
Your application program can specify portions of many QUEL statements
using host variables. The param statement enables database manipulation
statements to be built dynamically, in cases where the number and data
type of objects to be operated on is not determined until runtime.

  Status information
QUEL provides inquiry statements that return detailed information about
the database and forms being used by your application program.

  Runtime error handling
In EQUEL applications, you can silence error messages and trap errors
using an error handler routine. For more information on handling runtime
errors, see the Embedded QUEL Companion Guide.

  Repeat queries
You can reduce the overhead required to run an embedded query that is
executed many times by using repeat queries. The first time a repeat
query is executed, the DBMS Server encodes the query. On subsequent
executions of the query, this encoding can account for significant
performance improvements.