Database Access

Database access requires two kinds of information:

  1. Which records are to be selected. This takes the form of a set of restrictions that selected records must satisfy.

  2. What information is to be retrieved from the selected records.
The task of the NL access program is to translate the user's question in English into a formal call to an existing database program.

Our example database program takes queries of the form:

(QUERYDB < database>  < condition>  < action> )
The condition and action are Lisp code: if the condition is true, the action is executed and its result is collected. Both the condition and action can access fields of the current database record using the call:

(GETDB (QUOTE < fieldname> ))

Contents    Page-10    Prev    Next    Page+10    Index