8.6 Summary
In this chapter, we’ve learned about privileges in databases and how DCL statements help us manage them efficiently. Users are basically the accounts that connect to a database. In simple scenarios, we can assign privileges to users directly, and those privileges determine the users’ capabilities in terms of reading and writing data or executing subroutines.
For more complex scenarios, we can make use of roles, which are containers of predetermined sets of privileges. Instead of assigning the same privileges over and over to a set of users, assigning roles is a practical shortcut that lets us create a container role instead and assign the role to the users. Roles can also work recursively—a role can contain privileges from other ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access