Recall & Review
beginner
What are column-level permissions in a database?
Column-level permissions control access to specific columns in a table, allowing users to read or modify only certain columns instead of the entire table.
Click to reveal answer
beginner
How do you grant SELECT permission on specific columns in PostgreSQL?
Use the GRANT command with the column names listed after the table name, for example: GRANT SELECT (column1, column2) ON table_name TO user_name;
Click to reveal answer
intermediate
Why might you use column-level permissions instead of table-level permissions?
To protect sensitive data by restricting access to certain columns while still allowing access to other parts of the table.
Click to reveal answer
intermediate
Can you update specific columns using column-level permissions in PostgreSQL?
Yes, you can grant UPDATE permission on specific columns by specifying them in the GRANT statement, like: GRANT UPDATE (column1) ON table_name TO user_name;
Click to reveal answer
intermediate
What happens if a user has SELECT permission on a table but not on a specific column?
The user can query the table but will not see data from the restricted column; attempts to access it will result in an error.
Click to reveal answer
Which SQL command is used to give column-level SELECT permission in PostgreSQL?
✗ Incorrect
The GRANT command with column names specifies column-level permissions in PostgreSQL.
If a user has UPDATE permission on only one column, what can they do?
✗ Incorrect
Column-level UPDATE permission restricts updates to only the specified columns.
What is a main benefit of using column-level permissions?
✗ Incorrect
Column-level permissions help protect sensitive data by limiting access to specific columns.
Which of the following is NOT true about column-level permissions?
✗ Incorrect
DELETE permission applies to rows, not individual columns.
How do you revoke column-level SELECT permission in PostgreSQL?
✗ Incorrect
REVOKE with column names removes column-level permissions.
Explain what column-level permissions are and why they are useful in databases.
Think about how you might hide some information but show other parts of a table.
You got /4 concepts.
Describe how to grant and revoke SELECT permission on specific columns in PostgreSQL.
Focus on the GRANT and REVOKE commands with column lists.
You got /4 concepts.