Recall & Review
beginner
What is schema-level access control in PostgreSQL?
Schema-level access control means setting permissions on a whole schema to control who can create, modify, or use objects inside it.
Click to reveal answer
beginner
Which SQL command is used to grant usage rights on a schema in PostgreSQL?
The command is GRANT USAGE ON SCHEMA schema_name TO role_name;. It lets the role access objects inside the schema.
Click to reveal answer
intermediate
What does the CREATE privilege on a schema allow a user to do?
It allows the user to create new tables, views, or other objects inside that schema.
Click to reveal answer
intermediate
How do you revoke all privileges on a schema from a user in PostgreSQL?
Use REVOKE ALL ON SCHEMA schema_name FROM role_name; to remove all schema-level permissions from that role.
Click to reveal answer
beginner
Why is schema-level access control useful in a database?
It helps organize security by controlling access to groups of objects, making management easier and safer.
Click to reveal answer
Which privilege must be granted to allow a user to create tables in a schema?
✗ Incorrect
The CREATE privilege on a schema allows creating new objects like tables inside it.
What does the USAGE privilege on a schema allow?
✗ Incorrect
USAGE lets a user access objects inside the schema but does not allow creating or modifying them.
How do you remove all schema privileges from a user?
✗ Incorrect
REVOKE ALL ON SCHEMA removes all permissions on that schema from the specified user.
If a user has USAGE but not CREATE on a schema, what can they do?
✗ Incorrect
USAGE allows accessing existing objects but not creating new ones.
Which command grants a role permission to use a schema?
✗ Incorrect
GRANT USAGE ON SCHEMA lets a role access objects inside the schema.
Explain how schema-level access control works in PostgreSQL and why it is important.
Think about controlling who can see or create tables inside a folder-like structure.
You got /4 concepts.
Describe the difference between the USAGE and CREATE privileges on a schema.
One lets you look inside, the other lets you add new things.
You got /4 concepts.