Why Access Control Protects Data
📖 Scenario: You are managing a small company's database that stores employee information. To keep sensitive data safe, you need to control who can see or change the data.
🎯 Goal: Build a simple database table and set up access control by creating a user with limited permissions. This will show how access control protects data by restricting what users can do.
📋 What You'll Learn
Create a table called
employees with columns id, name, and salaryInsert three employee records with exact values
Create a user called
readonly_user with password 'readonlypass'Grant only SELECT permission on the
employees table to readonly_userDemonstrate the permission by writing a query that
readonly_user can run💡 Why This Matters
🌍 Real World
Companies use access control to protect sensitive employee data from unauthorized changes or views.
💼 Career
Database administrators must know how to create users and assign permissions to keep data safe and comply with privacy rules.
Progress0 / 4 steps