Laboratory Exercise 10
System Aspects of SQL
CMP 420: Database Systems
Lehman College, City University of New York
1 May 2003
Privileges
In lecture, we discussed how to grant privileges to other users
(see Ullman's slides13.ps).
The syntax for granting privileges in postgreSQL is described
at http://www.us.postgresql.org/users-lounge/docs/6.5/user/sql-grant.htm.
Following the user's guide,
- grant delete privilege to the companies table to
the person sitting next to you.
- grant insert privilege to the orders table to
everyone.
- grant update privileges on only co_name (from the table companies) to dba25
(Hint: since privileges can only be granted for entire tables,
think about how to create a virtual table with just co_name.)
How do you show that the privileges have changed?
How do you remove privileges? How would you remove deleting privileges
on companies from your neighbor?
Final Comments
If you have extra time, use it to work on your project.
Before leaving the lab, you need to log out and shut down your
computer. First, you should quit all applications. Then,
go to the K menu in the bottom left hand corner and
select Log Out. Choose the Shut Down option,
and shut off the monitor when you're done.
Remember to pick up any files you sent to the printer and to
take any personal belongings. It is difficult to get back
into the lab later (since it's locked when not in use), so,
it's worth making sure you haven't forgotten anything.