Skip to content
BENIBIX Learn

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

Data access control decides who may read or change each piece of data. It is set inside the database or warehouse, using grants. A grant gives a role one right, such as reading a table. People get roles, and roles get grants. Finer rules can hide some rows or some columns. The safe default is to give each person only what their job needs.

Example code

sql
GRANT SELECT ON sales TO analyst;
GRANT analyst TO lucy;
The analyst role may read the sales table. Lucy gets that role, so she can read it too.
Access control decides who may open the table at all. Finer rules then choose the rows and columns.

Common mistake

Giving people grants one by one. Grant to roles instead, so access is easy to see and to remove.

Key takeaways

  1. 1
    Roles, not people. Grant to a role, then add people.
  2. 2
    Only what is needed. Each job gets what it uses.
  3. 3
    Check it often. Old access gets taken away.