Sample Exam Questions

From the objective of OSS-DB Exam Silver
- Operation and Management - Basic operation management work (authority on table basis,
GRANT / REVOKE)

Sample Question

1.24

After creating the table test, the following operations were performed.
GRANT SELECT ON test TO PUBLIC;
GRANT UPDATE ON test TO foo;
REVOKE SELECT ON test FROM foo;

Choose one that is appropriate for the authority the user foo operates on the table test.

  1. It can update the table test, but it can not reference it.
  2. It can not reference or update the table test.
  3. It can refer to the table test, but it can not update it.
  4. You can reference or update table test.

※This sample exam is different from those that appear in the actual OSS-DB Exam.
2019/03/04

Answer and Explanation

GRANT is used to control authorization to objects in a database. The basic syntax of the GRANT statement is

GRANT (authority to grant) ON (target object) TO (grantee);

As a grantee, specify user name and role name individually. You can also assign privileges to all users by specifying PUBLIC.

Use REVOKE to deprive the granted privileges. It has a similar structure as the GRANT statement except we say FROM instead of TO

The third REVOKE statement in the example deprives SELECT authority from foo, but it should be noted that this concerns privileges granted individually to foo. In the example, we do not GRANT SELECT individually on foo, so nothing actually happens (it does not cause an error). Permissions granted to PUBLIC continue to be valid.

Therefore, the correct answer is D.