Security Roles   «Prev  Next»

Granting privileges with Role - Exercise

Course Project: Creating roles

Objective: Create roles for the COIN database.

Exercise Scoring

This exercise is worth 22 points, 2 points for each properly assigned privilege. You will be graded on the syntax. When you finish, submit your answer.

Background/overview

In previous modules, you created database objects for the COIN database. In this exercise, you will create three roles that can be used with the database.

Download files

You can download a correct version of the script for this exercise, roles.sql, from the project download file found on the Resources page.

Instructions

Create a script file that will in turn create three roles for the COIN database--a BROWSER role, for people who just want to see what is available; a BIDDER role, for active participants; and an ADMINISTRATION role, for those users setting up the auctions.
The privileges for each of the roles are as follows:
RoleTablePrivileges
BROWSER CLIENT SELECT, INSERT, UPDATE
 COIN SELECT
 BID SELECT
BIDDER BID INSERT, UPDATE
ADMINISTRATOR AUCTION ALL
 COIN ALL
 COINS_IN_LOT ALL
 CLIENT ALL
 LOT ALL
 BID ALL

Hints

You can either create all three roles first and then assign privileges to them, or you can create each role and assign its privileges before creating the next role. Consider whether to assign the BROWSER role to any of the other roles.

Submitting your exercise

Submit your answer in the text box below.