Recall & Review
beginner
What is a login role in PostgreSQL?
A login role is a user account that can connect to the database. It has permission to log in and perform actions based on its privileges.
Click to reveal answer
beginner
What is a group role in PostgreSQL?
A group role is a collection of roles. It cannot log in but can own privileges that are shared with its member roles.
Click to reveal answer
beginner
Can a group role log in to the database?
No, group roles cannot log in. Only login roles have the ability to connect to the database.
Click to reveal answer
intermediate
How do group roles help manage permissions?
Group roles let you assign permissions once to the group. Then all member roles inherit those permissions, making management easier.Click to reveal answer
intermediate
How do you add a login role to a group role in PostgreSQL?
Use the SQL command:
GRANT group_role TO login_role; This makes the login role a member of the group role.Click to reveal answer
Which PostgreSQL role type can connect to the database?
✗ Incorrect
Only login roles have the ability to log in and connect to the database.
What is the main purpose of a group role?
✗ Incorrect
Group roles are used to manage permissions collectively for their member roles.
How do you make a login role a member of a group role?
✗ Incorrect
The correct syntax to add a login role to a group role is: GRANT group_role TO login_role;
Can a group role own database objects like tables?
✗ Incorrect
Group roles can own database objects and assign privileges to their members.
If a login role is a member of multiple group roles, what permissions does it have?
✗ Incorrect
A login role inherits permissions from all group roles it is a member of.
Explain the difference between a login role and a group role in PostgreSQL.
Think about who can log in and how permissions are shared.
You got /4 concepts.
Describe how group roles simplify permission management in PostgreSQL.
Consider how managing permissions individually compares to using groups.
You got /4 concepts.