🛡️Data Access Control
Also known as Data Access Management, Data Permissions, Table Permissions
Rules for who may read or change each table, row and column.
Think of it like
It is like keys to the rooms in a building. Your key opens some doors, not all of them.
Example
Lucy is an analyst. Her role may read the sales tables but not the payroll table. When she moves teams, taking away the role removes all of it at once.
Why it matters
Data is as safe as its weakest grant. One open table can leak every email in it.
Definition
Example code
sql
GRANT SELECT ON sales TO analyst;
GRANT analyst TO lucy;Common mistake
Key takeaways
- 1Roles, not people. Grant to a role, then add people.
- 2Only what is needed. Each job gets what it uses.
- 3Check it often. Old access gets taken away.