GNU/Linux |
RedHat 5.2(Apollo) |
|
![]() |
create_view(l) |
![]() |
create view - construct a virtual class
create view view_name as
select expression1 [as attr_name1] | ||
{, expression_i [as attr_namei]} | ||
[from from.last] | ||
[where qual] |
create 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 desired to specify the processing of update operations to views. See [STON90] for a detailed discussion of this point.
--
--create a view consisting of toy department employees
--
create view toyemp as
select e.name | |
from emp e | |
where e.dept = ’toy’ |
--
--Specify deletion semantics for toyemp
--
create rule example1 as
on delete to toyemp | |
do instead delete emp | |
where emp.oid = current.oid |
create table(l), create rule(l),
![]() |
create_view(l) | ![]() |