SQL/MP Installation and Management Guide
Creating a Database
HP NonStop SQL/MP Installation and Management Guide—523353-004
5-41
View Security and Underlying Table Security
View Security and Underlying Table Security
These examples show how the security of a view depends on its underlying table or 
tables. Suppose that the underlying table has this security:
$VOL4.APPLTAB.EMPLOYEE Owner = 200,255
 Security = "GG-O"
This example shows a protection view on the table $VOL4.APPLTAB.EMPLOYEE. The 
owner of the underlying table is the same as the owner of this view. The security of the 
view enables any group 200 user to read the view but restricts updating and inserting 
rows to the view owner.
$VOL4.APPLTAB.PREMPV1 Owner = 200,255
 Security = "GO-O"
Example 5-2. A Shorthand View of Four Joined Tables
-- DEFINEs were previously added during this SQLCI
-- session or inherited from the command interpreter.
>> INFO DEFINE =ICAT;
 DEFINE NAME =ICAT
 CLASS CATALOG
 SUBVOL \SYS1.$VOL3.INVT
>> INFO DEFINE =INVENTORY_VIEW1;
 DEFINE NAME =INVENTORY_VIEW1
 CLASS MAP
 FILE $VOL1.MFG.IVIEW1
>> INFO DEFINE =PARTS;
 DEFINE NAME =PARTS
 CLASS MAP
 FILE $VOL1.MFG.PARTFILE
>> INFO DEFINE =ORDERS;
 DEFINE NAME =ORDERS
 CLASS MAP
 FILE $VOL2.MFG.ORDFILE
>> INFO DEFINE =ODETAIL;
 DEFINE NAME =ODETAIL
 CLASS MAP
 FILE $VOL2.MFG.ODETFILE
>> INFO DEFINE =PSUPPLIER;
 DEFINE NAME =PSUPPLIER
 CLASS MAP
 FILE $VOL3.MFG.PSUPFILE
>> CREATE VIEW =INVENTORY_VIEW1
+> AS SELECT A.PARTNUM, A.PARTDESC, A.PRICE, D.PARTCOST,
+> C.QTY_ORDERED, A.QTY_AVAILABLE, 
D.QTY_RECEIVED,
+> B.DELIV_DATE,D.EST_RECD_DATE
+> FROM =PARTS A, =ORDERS B, =ODETAIL C, =PSUPPLIER D
+> WHERE A.PARTNUM = C.PARTNUM AND
+> A.PARTNUM = D.PARTNUM AND
+> C.ORDERNUM = B.ORDERNUM
+> CATALOG =ICAT;










