# Data Access Control

> Rules for who may read or change each table, row and column.

**Field:** Data Engineering  
**Category:** Governance & Quality  
**Also known as:** Data Access Management, Data Permissions, Table Permissions

## Think of it like

It is like keys to the rooms in a building. Your key opens some doors, not all of them.

## 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

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.

## 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.

## Why it matters

Data is as safe as its weakest grant. One open table can leak every email in it.

## Common mistake

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

## Three principles

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

## Related terms

- [Authorization](https://learn.benibix.com/term/development/authorization)
- [Role-Based Access Control (RBAC)](https://learn.benibix.com/term/development/role-based-access-control)
- [Principle of Least Privilege](https://learn.benibix.com/term/development/principle-of-least-privilege)
- [Row-Level Security (RLS)](https://learn.benibix.com/term/data/row-level-security)
- [Column-Level Security](https://learn.benibix.com/term/data/column-level-security)
- [Data Classification](https://learn.benibix.com/term/data/data-classification)
- [Data Sharing](https://learn.benibix.com/term/data/data-sharing)

![Two copies of one customer table with region, customer, email and total columns. On the left, the whole table the data owner can read. On the right, what Lucy, an analyst for Europe, can read: the two US rows and the email column are greyed out.](https://learn.benibix.com/diagrams/dat2-access-control.svg)

---

Source: https://learn.benibix.com/term/data/data-access-control
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
