角色和用户之间的区别
角色和用户之间有什么区别?
What is the differences beween roles and users.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
角色和用户之间有什么区别?
What is the differences beween roles and users.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
一个角色可以有多个用户。一个示例可能是管理员角色,这可能意味着被分配的人员及其备份。两者都拥有相同的权利,这些权利体现在角色中。个人可以来来去去,但角色仍然存在。
A role can have many users. An example might be an Admin role, which could mean someone who's assigned and their backup. Both would have the same rights, which are embodied in the role. Individuals can come and go, but roles remain.
角色通常定义由一个或多个用户执行的业务功能(或一组功能)。例如“客户服务代理”或“业务分析师”。用户是包含在角色中的个人 - Bob、Nancy 和 Steve 可能被分配给客户服务代理角色。
这使得更容易为数据库对象分配权限。您可以为角色分配权限,属于该角色的任何用户都会继承同一组权限。
A role typically defines a business function (or set of functions) performed by one or more users. Examples would be 'customer service agent' or 'business analyst'. A user is an individual person who is included in the role - Bob, Nancy, and Steve might be assigned to the customer service agent role.
This makes is easier to assign permissions to database objects. You can assign permissions to the role, and any user who belongs to that role inherits the same set of permissions.
在技术层面,请参阅其他答案。在实际层面上,当您因角色更改而拥有大量用户集且需要灵活的权限时,不同之处在于分配每个用户权限意味着用户职责的任何更改都需要对需要将用户添加到的多个数据库对象进行权限更改/从烫发中删除。
然而,如果将权限分配给角色,则唯一的变化是角色成员身份。
后者对 DBA 的资源负担显着减少,并且由于所需的工作较少,因此发生操作员错误的可能性也显着降低(例如,要做的工作更少 => 搞砸的机会更少),因此更安全。
On a technical level, see other answers. On a practical level, when you have large user set with fluid permissioning needs due to changing roles, the difference is that assigning per-user permissions means any change in user responsibilities necessitates permissions changes on MULTIPLE database objects that user needs to be added to/removed from perms.
Whereas if the perms are assigned to the roles, the only change is in the role membership.
The latter is both significantly less resource taxing on DBAs, and due to less work needed, significantly less likely to suffer from operator error (e.g. less work to do => less chance to screw it up) and thus more secure.