Why Database Security Matters
📖 Scenario: You are working as a database administrator for a small company. The company stores customer information in a PostgreSQL database. You want to understand why database security is important and how to protect sensitive data.
🎯 Goal: Build a simple PostgreSQL setup that includes a table with sensitive data, a role with limited permissions, and a query that demonstrates controlled access to the data.
📋 What You'll Learn
Create a table called
customers with columns id, name, and emailInsert three specific customer records into the
customers tableCreate a role called
readonly_user with SELECT permission only on the customers tableWrite a query to select all customer names and emails using the
readonly_user role💡 Why This Matters
🌍 Real World
Companies must protect sensitive customer data from unauthorized access to comply with laws and maintain trust.
💼 Career
Database administrators and developers use roles and permissions to secure databases and control who can see or change data.
Progress0 / 4 steps