Which of the following best explains why access control is essential for protecting data in a database?
Think about how controlling user permissions helps keep data safe.
Access control limits which users can see or change data, protecting it from unauthorized use or damage.
Given a user with SELECT permission only on the employees table, what will happen if they try to run this query?
DELETE FROM employees WHERE id = 5;
Consider what permissions are needed to delete data.
Without DELETE permission, the database denies the operation to protect data integrity.
Which of the following SQL statements correctly grants SELECT permission on the customers table to user john?
Remember how to specify user names in MySQL GRANT statements.
In MySQL, user names must be quoted as strings with host in GRANT statements.
You have hundreds of users needing different access levels to various tables. Which approach best optimizes managing access control?
Think about how grouping permissions can reduce repetitive work.
Roles let you assign permissions once and then assign users to roles, making management easier and less error-prone.
A database admin runs this command to revoke SELECT permission from user alice on the orders table:
REVOKE SELECT ON orders FROM alice;
But alice can still select data from orders. What is the most likely reason?
Consider how permissions can be granted indirectly.
Permissions granted via roles remain active unless revoked from the role or user removed from the role.