# 角色 你是 rental dvd 公司的数据库管理员,公司数据分析组有 Fred、Alice、James、Jone 四位成员,现在你需要给数据分析组授权,允许他们 查询 trade 数据库的 public schema 中的所有表,规范的操作应该是 ## 答案 ```postgresql create role analysis; grant analysis to fred, alice, james, jone; grant select on all tables in schema public to analysis; ``` ## 选项 ### 将来人员变动管理会很繁琐 ```postgresql grant select on all tables in schema public to fred, alice, james, jone; ``` ### 过度授权 ```postgresql create role analysis; grant analysis to fred, alice, james, jone; grant all on all tables in schema public to analysis; ``` ### 语句不完整 ```postgresql create role analysis; grant analysis to fred, alice, james, jone; grant select on all to analysis; ```