Authorisations - Privileges
As relational theory is silent on the issue of authorisation, it offers nothing with which SQL's vast edifice in support of what it calls privileges can be compared.Example is a very simple case showing how the corresponding example could be done in SQL.
Example: Granting privileges GRANT SELECT, INSERT, DELETE, UPDATE ON ENROLMENT TO User9 ;
Explanation:
- GRANT is the key word indicating that privileges are being granted.
- SELECT, INSERT, DELETE, UPDATE identify operators that can be applied to a base table. The first, SELECT, is used here to indicate that permission to access the current value is being granted. The others are all update operators with very much the same effects as their counterparts in Tutorial D. If DELETE were omitted, for example, then User9 would not be allowed to use DELETE commands on ENROLMENT.
- ON ENROLMENT identifies the base table on which those privileges are being granted.
- TO is the key word required to precede the commalist of user names, officially termed authorization identifiers, denoting the users on whom the specified privileges are to be conferred.
So, the example actually grants four distinct privileges.