Week2 - Data Control and Transaction Control Language / Analyze

The questions can come in any order, so make sure you are selecting right option for all questions.

1. You are working with a database system, and you've just completed a series of updates to customer records. You want to ensure that these changes are permanently saved. Which TCL statement would you use in this situation?
(a) COMMIT
2. A database user has inadvertently been given more permissions than necessary and needs to have certain privileges revoked without affecting their overall access. What DCL statement would you use for this purpose?
(b) REVOKE
3. During a large-scale database update, you want to create a point where you can later roll back if needed, without affecting the entire transaction. What TCL statement would you employ?
(c) SAVEPOINT
4. You have initiated a transaction to transfer funds between two bank accounts. However, you realize that the transfer was made in error, and you want to undo the changes only up to a certain point. What TCL statement would you use?
(b) ROLLBACK
5. Your organization has decided to implement a new security policy, and you need to grant a group of users the ability to execute stored procedures in the database. What DCL statement would you use?
(a) GRANT
6. A user who previously had the privilege to modify records in a critical database table is being transferred to a different department and should no longer have these permissions. What DCL statement would you use to revoke the user's update privileges?
(b) REVOKE
7. You are setting up a new database for a project where data privacy is a top priority. You want to ensure that only authorized users have access to sensitive information in the database. What DCL statement would you use to control access to specific data?
(a) GRANT
8. You are starting a complex database operation, and you want to ensure that all subsequent changes are treated as part of a single transaction. Which TCL statement would you use to begin this transaction?
(d) BEGIN TRANSACTION
9. In the middle of a complex database transaction, you encounter an error that you cannot resolve immediately. You want to revert all the changes made during the current transaction. Which TCL statement would you use?
(b) ROLLBACK
10. You are responsible for managing a database that contains sensitive financial information. A new user needs read-only access to specific tables in the database. What DCL statement would you use to grant this user the necessary privileges?
(a) GRANT

Post a Comment