Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
HP.com home
Jazz home  >  Papers & Training

IMAGE/SQL: Issues and answers concerning SQL tables

» 

Jazz home

»

Software

»

Papers & Training

»

Java

»

HP Partners

»

News & Events

»

Register for more info

Content starts here
Prev Page Next Page Manual Top Home Page


3.2 What are the key elements of security in SQL (continued)?



Key points


  • HOW
    • The GRANT statement gives specified authority to one or more users or authorization groups. You can grant authorities on either tables or views (which are described below).

    • The REVOKE statement takes away authority that was previously granted.

    • In TurboIMAGE, a class can be given access to either an entire data set or a subset of data items from a data set.

      In SQL, a USER or GROUP can be given access to either an entire table or a subset of columns or rows from the table. To give access to a subset, the DBA can create a view. Think of a view as a filter that sits on top of the table. The CREATE VIEW statement is used to create a view on a table (or even on a another view).

      isql => CREATE PUBLIC TABLE Parts.Vendors 
      > (PartNumber   char(16),
      >  VendorNumber INTEGER,
      >  VendorCode   INTEGER)
      > IN partsfileset;
      

      isql => CREATE VIEW Parts.SpecialVendors > as SELECT PartNumber,VendorNumber FROM Parts.Vendors > where VendorCode = 5 > IN partsfileset;

      ...

      isql => select * from Parts.Vendors; /* THIS IS THE TABLE */ ----------------+------------+----------- PARTNUMBER |VENDORNUMBER|VENDORCODE ----------------+------------+----------- 1123-P-01 | 9001| 5 1133-P-01 | 9002| 4 1143-P-01 | 9003| 1 1153-P-01 | 9004| 5 1223-MU-01 | 9025| 5 1233-MU-01 | 9006| 4 1243-MU-01 | 9018| 1

      isql => select * from Parts.SpecialVendors;/* THIS IS THE VIEW */ ----------------+------------ PARTNUMBER |VENDORNUMBER ----------------+------------ 1123-P-01 | 9001 1153-P-01 | 9004 1223-MU-01 | 9025


Prev Page Next Page Manual Top Home Page

Page last updated on November 29, 1995

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2004 Hewlett-Packard Development Company, L.P.