WARNING

This text was automatically converted from troff me macros to HTML. Information may have been lost, added, or changed in the process. Lars Aronsson and Lysator do not guarantee the correctness of this HTML document.

NAME

define view *- construct a virtual class

SYNOPSIS

define view view_name
        ( [ dom_name_1 =] expression_1
     {, [dom_name_i =] expression_i} )
    [ from from_list ]
    [ where qual ]

DESCRIPTION

"Define view" will define a view of a class. This view is not physically materialized; instead the rule system is used to support view processing as in [STON90]. Specifically, a query rewrite retrieve rule is automatically generated to support retrieve operations on views. Then, the user can add as many update rules as he wishes to specify the processing of update operations to views. See [STON90] for a detailed discussion of this point.

EXAMPLE

/* define a view consisting of toy department employees */

define view toyemp (e.name)
   from e in emp
   where e.dept = "toy"

/* Specify deletion semantics for toyemp */

define rewrite rule example1 is
   on delete to toyemp
   then do instead delete emp where emp.OID = current.OID

SEE ALSO

postquel(commands), create(commands), define rule(commands).