This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Authorizations”.
1. The database administrator who authorizes all the new users, modifies the database and takes grants privilege is
a) Super user
b) Administrator
c) Operator of operating system
d) All of the mentioned
View Answer
Explanation: The authorizations provided by the administrator to the user is a privilege.
2. Which of the following is a basic form of grant statement?
a)
GRANT 'privilege list' ON 'relation name or view name' TO 'user/role list';
b)
GRANT 'privilege list' ON 'user/role list' TO 'relation name or view name';
c)
GRANT 'privilege list' TO 'user/role list'
d)
GRANT 'privilege list' ON 'relation name or view name' ON 'user/role list';
Explanation: The privilege list allows the granting of several privileges in one command .
3. Which of the following is used to provide privilege to only a particular attribute?
a) Grant select on employee to Amit
b) Grant update(budget) on department to Raj
c) Grant update(budget,salary,Rate) on department to Raj
d) Grant delete to Amit
View Answer
Explanation: This grant statement gives user Raj update authorization on the budget attribute of the department relation.
4. Which of the following statement is used to remove the privilege from the user Amir?
a) Remove update on department from Amir
b) Revoke update on employee from Amir
c) Delete select on department from Raj
d) Grant update on employee from Amir
View Answer
Explanation: revoke
5. Which of the following is used to provide delete authorization to instructor?
a)
CREATE ROLE instructor ; GRANT DELETE TO instructor;
b)
CREATE ROLE instructor; GRANT SELECT ON takes TO instructor;
c)
CREATE ROLE instructor; GRANT DELETE ON takes TO instructor;
d) All of the mentioned
View Answer
Explanation: The role is first created and the authorization is given on relation takes to the role.
6. Which of the following is true regarding views?
a) The user who creates a view cannot be given update authorization on a view without having update authorization on the relations used to define the view
b) The user who creates a view cannot be given update authorization on a view without having update authorization on the relations used to define the view
c) If a user creates a view on which no authorization can be granted, the system will allow the view creation request
d) A user who creates a view receives all privileges on that view
View Answer
Explanation: A user who creates a view does not necessarily receive all privileges on that view.
7. If we wish to grant a privilege and to allow the recipient to pass the privilege on to other users, we append the __________ clause to the appropriate grant command.
a) With grant
b) Grant user
c) Grant pass privelege
d) With grant option
View Answer
Explanation: None.
8. In authorization graph, if DBA provides authorization to u1 which inturn gives to u2 which of the following is correct?
a) If DBA revokes authorization from u1 then u2 authorization is also revoked
b) If u1 revokes authorization from u2 then u2 authorization is revoked
c) If DBA & u1 revokes authorization from u1 then u2 authorization is also revoked
d) If u2 revokes authorization then u1 authorization is revoked
View Answer
Explanation: A user has an authorization if and only if there is a path from the root of the authorization graph down to the node representing the user.
9. Which of the following is used to avoid cascading of authorizations from the user?
a) Granted by current role
b) Revoke select on department from Amit, Satoshi restrict;
c) Revoke grant option for select on department from Amit;
d) Revoke select on department from Amit, Satoshi cascade;
View Answer
Explanation: The revoke statement may specify restrict in order to prevent cascading revocation. The keyword cascade can be used instead of restrict to indicate that revocation should cascade.
10. The granting and revoking of roles by the user may cause some confusions when that user role is revoked. To overcome the above situation
a) The privilege must be granted only by roles
b) The privilege is granted by roles and users
c) The user role cannot be removed once given
d) By restricting the user access to the roles
View Answer
Explanation: The current role associated with a session can be set by executing set role name. The specified role must have been granted to the user, else the set role statement fails.
Sanfoundry Global Education & Learning Series – Database Management System.
- Check Computer Science Books
- Practice Computer Science MCQs
- Practice Programming MCQs
- Practice RDBMS MCQ
- Check DBMS Books