NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
V-9
Views
The columns SUBSYSTEMNAME through CATALOGCLASS (1 through 4) were
created in version 1. The columns CATALOGVERSION and CATALOGFORMAT (5
through 6) were added in version 300.
Views
A view is a logical table created with the CREATE VIEW statement and derived by
projecting a subset of columns, restricting a subset of rows, or both, from one or more
base tables or other views. A view has a file label but has no actual data separate from
the data in the tables on which it is defined.
A view name must be a Guardian name. The fully expanded name of the view must be
unique among object names in the network.
A view is either a protection view or a shorthand view:
A protection view is derived from a single table and can be read, updated, and
secured.
A shorthand view is derived from one or more tables or other views. A shorthand
view can be read but cannot be updated. A shorthand view can be secured for purge
authority, but any user who has read access to the tables and views underlying the
view can read the view.
Protection views are always valid. A shorthand view becomes invalid if a user who lacks
purge authority for the view itself purges any of the tables or views underlying the view.
To make an invalid shorthand view valid, the owner of the invalid view must purge and
re-create the view.
VIEWS Table
The VIEWS table is a catalog table that describes the views available for the base tables.
The following table describes the contents of the VIEWS table.
Column Name Data Type Description
1 VIEWNAME * CHAR (34) Name of view
2 PROTECTION CHAR (1)
Y if protection view
N if shorthand view
3 VALIDDEF CHAR (1)
Y if definition valid
N if definition not valid
4 AUDIT CHAR (1)
Y if all underlying tables are
audited
N if all underlying tables are
nonaudited
M if based both on audited and
nonaudited tables
* Indicates primary key