Recall & Review
beginner
What are table-level permissions in PostgreSQL?
Table-level permissions control what actions users can perform on entire tables, such as SELECT, INSERT, UPDATE, and DELETE.
Click to reveal answer
beginner
Which SQL command is used to grant table-level permissions in PostgreSQL?
The GRANT command is used to give users specific permissions on tables.
Click to reveal answer
beginner
How do you revoke table-level permissions from a user in PostgreSQL?
Use the REVOKE command followed by the permission type and the user name to remove permissions on a table.
Click to reveal answer
beginner
What does the following command do? <br>
GRANT SELECT ON employees TO alice;
It allows the user 'alice' to read data from the 'employees' table but not modify it.
Click to reveal answer
intermediate
Can table-level permissions be granted to roles in PostgreSQL?
Yes, permissions can be granted to roles, which are groups of users, to simplify permission management.
Click to reveal answer
Which command grants a user permission to insert data into a table?
✗ Incorrect
The GRANT INSERT command gives the user permission to add new rows to the table.
What does the REVOKE command do in PostgreSQL?
✗ Incorrect
REVOKE removes previously granted permissions from a user or role.
If you want a user to only read data from a table, which permission should you grant?
✗ Incorrect
SELECT permission allows reading data without changing it.
Can you grant multiple permissions in one GRANT command?
✗ Incorrect
You can grant multiple permissions by listing them separated by commas in the GRANT command.
What happens if a user has no permissions on a table?
✗ Incorrect
Without permissions, the user cannot access the table in any way.
Explain how to grant and revoke table-level permissions in PostgreSQL.
Think about the commands that control access to tables.
You got /5 concepts.
Describe why table-level permissions are important in database security.
Consider what could happen if everyone had full access to all tables.
You got /5 concepts.