13.8. Security and Metadata

This section looks briefly at two topics that any database administrator needs to be familiar with: security and metadata in SQL. Let’s begin with security. A database is secureif and only if operations on it can be performed only by users authorized to do so. Each system user is assigned a user identifier (AuthID). The user who “owns” or creates a database has all access privileges on it and can grant and revoke access privileges on it to other users. SQL provides a grant statementfor granting various kinds of privileges to users. The SQL-92 syntax is:

grant all privileges |
select linsert[(col)] | update [ (col) ] | delete | usage | references [ ( col) ] [ .... ]
on object
   to user-list[ with grant option ]

where ...

Get Information Modeling and Relational Databases, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.