In PostgreSQL, what is the primary difference between a login role and a group role?
easy📝 Conceptual Q1 of 15
PostgreSQL - Roles and Security
In PostgreSQL, what is the primary difference between a login role and a group role?
ALogin roles can connect to the database; group roles cannot.
BGroup roles can connect to the database; login roles cannot.
CBoth login and group roles can connect to the database.
DNeither login nor group roles can connect to the database.
Step-by-Step Solution
Solution:
Step 1: Understand role types in PostgreSQL
Login roles are designed to allow users to connect to the database, while group roles are used to organize privileges and do not have login capability by default.
Step 2: Compare login and group roles
Login roles have the LOGIN attribute, enabling connection. Group roles typically lack LOGIN and serve as containers for privileges.
Final Answer:
Login roles can connect to the database; group roles cannot. -> Option A
Quick Check:
Login role connection ability = true [OK]
Quick Trick:Login roles have LOGIN attribute; group roles do not [OK]
Common Mistakes:
Assuming group roles can login by default
Confusing login roles with user accounts
Thinking group roles are separate users
Master "Roles and Security" in PostgreSQL
9 interactive learning modes - each teaches the same concept differently