Users, Roles and Groups in SQL - CA33
My Thinking and Approach Introduction In this task, I worked with roles and permissions in SQL using the dvdrental database. The goal was to control access to different tables by creating roles, as...

Source: DEV Community
My Thinking and Approach Introduction In this task, I worked with roles and permissions in SQL using the dvdrental database. The goal was to control access to different tables by creating roles, assigning privileges, and managing user groups. This helped me understand how database security works in real-world applications. Problem Statement Create roles with limited access Grant and revoke permissions Restrict access to specific columns Manage users using groups My Initial Thought At first, I thought: Roles are just users Permissions are simple But I realized: Roles control access at different levels Permissions can be very specific Security is very important in databases Key Observation GRANT is used to give permissions REVOKE is used to remove permissions Roles can be grouped for easier management Column-level access is possible Solutions Task 1: Create report_user with access to film table CREATE ROLE report_user WITH LOGIN PASSWORD 'password'; GRANT SELECT ON film TO report_user; E